> For the complete documentation index, see [llms.txt](https://seg-fault.gitbook.io/researchs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://seg-fault.gitbook.io/researchs/aws-cloud-security/hacking-cognito/cognito-api-calls.md).

# Cognito - API Calls

## Cognito API Calls

Here are some popular Cognito API calls and what they do :-

* `cognito-idp:get-user` : API call to fetch user details associated with the access token
* `cognito-identity:get-id` : API call to fetch the identity id from Cognito Indentity Pool ID.
* `cognito-identity:get-credentials-for-identity` : API call to fetch the STS tokens using the IdentityID.
* `cognito-idp:initiate-auth` : API call to initiate authentication and fetch the AccessToken & TokenId by passing the authentication credentials.
* `cognito-identity:get-credentials-for-identity` : API call to fetch the STS tokens for authenticated users by passing the TokenId and Cognito User Pool Id.
