Setup AWS Cognito and Signup user using Postman
Setup AWS Cognito and Signup User using Postman
To Setup a cognito follow the below steps
1:- Open AWS Console and move to Cognito
2:- Click on Manage User Pools & Click on Create a User Pool.
3:- Click on Review Defaults and Create a User Pool.
4:- Create a App Clients
5:- After Creating App Client You will get a Client Id which we will use in Postman.
6:- Now open a Postman for Signup a User.
Request URL:- https://cognito-idp.us-east-1.amazonaws.com
Method:- POST
Request Header:-
Request Payload:-
{ "ClientId": "XXXXXXXXXXXXXX", "Username": "vishal.gupta.sf@gmail.com", "Password": "Password@1234", "UserAttributes": [ { "Name": "email", "Value":"vishal.gupta.sf@gmail.com" }, { "Name": "locale", "Value": "en_US" } ], "ValidationData": null }
Response:-
{ "CodeDeliveryDetails": { "AttributeName": "email", "DeliveryMedium": "EMAIL", "Destination": "v***@g***" }, "UserConfirmed": false, "UserSub": "bac570d3-ea47-4728-918e-74ec9512e5db" }
7:- As soon ass you recieve an email with code, now next step is to confirm the User, Below is the postman script for same
Request URL:- https://cognito-idp.us-east-1.amazonaws.com
Request Header:-
Method:- POST
Request Body:-
{ "ClientId": "XXXXXXX", "ConfirmationCode":"353829", "Username": "vishal.gupta.sf@gmail.com" }
Response:-
{}
Comments
Post a Comment