The OAuth2 client ID issued by Amazon Cognito
Authentication API (1.0.0)
Obtain an OAuth2 access token from Amazon Cognito using the client_credentials grant.
The returned access_token must be sent as a Bearer token in the Authorization header when calling the Check In Service API endpoints defined in openapi.yaml.
Request
Exchange client credentials for a bearer token.
Equivalent curl request:
curl --location 'https://cps-poc-api-access.auth.eu-south-2.amazoncognito.com/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=<your_client_id>' \
--data-urlencode 'client_secret=<your_client_secret>'Must be client_credentials
Value"client_credentials"
Example: "client_credentials"
- Mock serverhttps://developer.corpay-lodging.com/_mock/api/auth/oauth2/token
- Authentication Serverhttps://cps-poc-api-access.auth.eu-south-2.amazoncognito.com/oauth2/token
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer.corpay-lodging.com/_mock/api/auth/oauth2/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d grant_type=client_credentials \
-d client_id=someId \
-d client_secret=someSecretResponse
application/json
{ "access_token": "eyJraWQiOiJhYmNkZWYxMjM0NTY3ODkw...", "expires_in": 3600, "token_type": "Bearer" }