Using Postman: Difference between revisions
Jump to navigation
Jump to search
Email
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
# Click stage /Test | # Click stage /Test | ||
#: [[File:Screenshot from 2022-10-10 10-33-30.png]] | #: [[File:Screenshot from 2022-10-10 10-33-30.png]] | ||
#* and click export choose ..”Export as Swagger+Postman Extensions” copy code JSON | #* and click export choose ..”Export as Swagger+Postman Extensions” copy code JSON, if Postman does not work with JSON, try YAML | ||
#: [[File:Screenshot from 2022-10-10 10-38-08.png]] | #: [[File:Screenshot from 2022-10-10 10-38-08.png]] | ||
# Go to postman and paste in import/ Raw text/ continue. | # Go to postman and paste in import/ Raw text/ continue. |
Revision as of 05:40, 13 January 2023
Connecting Postman to API Gateway
Connect API to Post man.
- AWS API Gateway: click name of service api
- Click stage /Test
- and click export choose ..”Export as Swagger+Postman Extensions” copy code JSON, if Postman does not work with JSON, try YAML
- Go to postman and paste in import/ Raw text/ continue.
- Now My Workspace connect to Api finished.
Access Token
web interface: https://d1gix48j5w3eur.cloudfront.net/buying
- Navbar > Sign in using mock account (suggested), if you signup with new user will get default role in basicUser, that mean you NOT allow to access all functions.
- F12 to see element
- select tab >> Application
- Session Storage > http... > access_token and copy these token to postman
- Go to postman and paste token to Authorization > TYPE: Bearer Token >> [Token] ...
- For auth: UserLevel, need to send “targerUserId” in Params>Path Variables>
KEY: targetUserId
VALUE: <targetUserId>
Email use in web interface for get access token.
- basicUserA
- Email: success+basicUserTest@simulator.amazonses.com
- Password: Abc123456!
- verifiedUserA
- Email: success+verifiedUserTestA@simulator.amazonses.com
- Password: Abc123456!
- verifiedUserB
- Email: success+verifiedUserTestB@simulator.amazonses.com
- Password: Abc123456!
- superUserA
- Email: success+superUserTest@simulator.amazonses.com
- Password: Abc123456!
Test API in post man
- Click on workspace and choose folder and file testing
- Click Body choose rew> JSON and push your request in code block.
- and send message.
- Below block show return response.
- If test api works . will show return response and status code: 200 OK
- You can see more response see in cloudwatch in function testing.