Postman API

To confirm this is all working as expected return to Postman, the same tab from earlier will be open, click Send to call the api again. This time the response will be:

    "message": "Unauthorized"

This is expected, the API now require authorisation!

The API is expecting a new http header, the header required is:

Key:  Authorization
Value:  Bearer token

You can manually add this by extracting the token as in earlier steps when we tested the Authorizer in the API Gateway console or you can click on the Authorization tab, for type select OAuth 2.0 This should re-populate the settings we entered. Available tokens will be empty, scroll down and click Get New Token, put in the username and password of the user created. Click Proceed, this time once the Manage Access Tokens dialog appears click Use Token.

Click on the Headers tab and notice the additional header key and value.

Note: you may need to click the small eye icon to display hidden/auto generated headers.

Click Send and the API will again return data!

Well done!