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 OAuth token endpoint. You can find the full documentation for this endpoint here.
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://partner-api-001.prd.jifeline.cloud/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://partner-api-001.prd.jifeline.cloud/oauth2/token
Example response
{
"access_token": "eyJraWQ.........",
"expires_in": 3600,
"token_type": "Bearer"
}
The access token is valid for 1 hour, however it is cached only for 5 minutes. This means that if you request the token again after 6 minutes, you will get a new token even though the previous one was still valid for +-55 minutes.
This gives you the room to implement a refresh mechanism to request a new token before it expires. A safe implementation would be to request a new token every 30 minutes.
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.