0

I have authenticated with Facebook and have the following:

  • accessKeyId
  • secretAccessKey
  • identityId
  • sessionToken

How can I call my api in API Gateway (without generating an sdk)?

ovg
  • 1,486
  • 1
  • 18
  • 30
  • Was there any updates on this ? – Ronak K May 29 '18 at 14:44
  • Yeah, I figured it out eventually. Not quite sure what the original problem was. Are you also seeking a solution or just wondering if this should be closed? Maybe share a link to your own question and I might be able to help. I was using JavaScript and the serverless framework and faced issues with configuring aws and also CORS. I can look at my cloudformation template if it's useful? – ovg May 30 '18 at 20:00
  • I am seeking a solutions so if you can guide me – Ronak K Jun 05 '18 at 12:51
  • Would also be interested in a solution to this. – Remotec Nov 26 '18 at 15:50
  • I'm having this same issue. I've authenticated with Facebook and received the accessKeyId, secretAccessKey, identityId, and sessionToken. I tried to use those to call my API Gateway, but none worked. What token did you use to call your API Gateway? I'm able to call my API Gateway successfully with a user from the User Pool, but get the Unauthorized message when I try to call it with the authenticated Facebook user. – codeinaire Aug 19 '19 at 08:28

1 Answers1

0

I know this is an old question, but I found an answer for it using Postman.

This is the essence of it from AWS docs:

  1. Launch Postman.
  2. Enter the endpoint URL of a request in the address bar and choose the appropriate HTTP method from the drop-down list to the left of the address bar.
  3. If required, choose the Authorization tab. Choose AWS Signature for the authorization Type. Enter your AWS IAM user's access key ID in the AccessKey input field. Enter your IAM user secret key in SecretKey. Specify an appropriate AWS region that matches the region specified in the invocation URL. Enter execute-api in Service Name.

This will work to successfully call a API Gateway. Only if a User Pool and Identity Pool have been correctly set-up, and the Authorization attribute in the Method Request setting for the API Gateway resource is set to AWS_IAM.

For more information about the AWS Signature for api calls check out this SO post. While this SO post contains some more information, with pictures, about how to make a API Gateway request in Postman.

codeinaire
  • 1,682
  • 1
  • 13
  • 26