Reputation: 11
Is there any Rest API of AWS cognito-idp admin-initiate-auth to get the tokens without using the CLI commands? If yes, what is it, or where do I find it? Also I can't use any available SDKs as the environment where I am building my application won't support any.
Thanks in advance.
Upvotes: 0
Views: 1318
Reputation: 3521
Yes, there is. In fact, all AWS CLI commands get translated to REST API calls in the background. For example, the REST API for cognito-idp admin-initiate-auth is AdminInitiateAuth. You can use Postman to make HTTP calls to test this. If you want to know the actual URL, HTTP headers etc. needed in the request then run your cli command with --debug
option. The debug log will have this info. Also, in Postman, you need to set Auth type as AWS Signature and mention your Access key & Secret key. This is because these REST API calls needs to be SigV4 signed. There are libraries available in languages like python & nodejs which do the same.
Upvotes: 1