To make use of this API you need to have a Client ID and Client Secret.
With these credentials you can request a token which you will need to access the resources from this API.
Be aware: the Client Secret is only provided once so keep this value somewhere safe.
You can retrieve an access token via our Amazon Cognito OAuth token endpoint.
The endpoint only supports HTTPS POST
. You need to separately retrieve this token before executing any of the other
endpoints.
The token endpoint is as follows:
https://jifeline-user-pool-prd.auth.eu-central-1.amazoncognito.com/oauth2/token
.
Content-Type
: Set the value of this parameter to application/x-www-form-urlencoded
.
grant_type
: Must equal client_credentials
.
client_id : Must equal the value received in the email received when generating new credentials. It can also be found in the API credentials management screen.
client_secret : Must equal the value received in the email received when generating new credentials.
In the response body you will find your access token in addition with the amount of seconds until this token is no longer valid.
Example request
curl -X POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'grant_type=client_credentials&client_id=<yourClientId>&client_secret=<yourClientSecret>' \
https://jifeline-user-pool-prd.auth.eu-central-1.amazoncognito.com/oauth2/token
Example response
{
"access_token": "eyJraWQ.........",
"expires_in": 3600,
"token_type": "Bearer"
}
To make use of your access token you need to add the following headers to your requests.
Authorization
: Must equal Bearer <yourAccessToken>
Example request
curl \
--header 'Authorization: Bearer <yourAccessToken>' \
https://partner-api-001.prd.jifeline.cloud/v2/system/locales
We have created a small example application in Java (JRE/JDK 11) to demonstrate how to authenticate with our Partner API. You can download it here. Please extract the archive and check the README.md for more information.