How to format network.request for AWS Cognito?

Hi everyone,
 
I just can’t seem to figure out how to take the example on this page and turn it into a network.request. This is what I have:

local headers = {} headers["CONTENT-TYPE"] = "application/x-amz-json-1.1" headers["X-AMZ-TARGET"] = "com.amazonaws.cognito.identity.model.AWSCognitoIdentityService.GetId" headers["X-AMZ-DATE"] = timeStamp local body = {} body.Operation = "com.amazonaws.cognito.identity.model#GetId" body.Service = "com.amazonaws.cognito.identity.model#AWSCognitoIdentityService" body.Input = { AccountId = "283453869280", IdentityPoolId = "us-east-1:ae93d436-9a34-4dd4-811b-fda18fba2d8f" } local params = {} params.headers = headers params.body = json.encode( body ) local function networkListener( event ) if ( event.isError ) then print( "Network error!") else print ( "RESPONSE: ", event.response ) end end network.request("https://cognito-identity.amazonaws.com/", "POST", networkListener, params)

But I get this response from Amazon:

{"\_\_type":"ValidationException","message":"1 validation error detected: Value null at 'identityPoolId' failed to satisfy constraint: Member must not be null"}

Any help would be appreciated

Thanks

I see that no one answered you. Did you figure it out?

I see that no one answered you. Did you figure it out?