Authentication

Prerequisites

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.

API credentials management

  1. Login into your Partner Portal.
  2. Go to "Settings" via the menu on the left side.
  3. Go to the "API" tab.
  4. Click on the "Manage your api credentials"-button to go to the API credentials management screen.

Create new API credentials

  1. In the API credentials management screen.
  2. Click "Add new API credentials" button at the bottom to open a form.
  3. Provide a "credential name" which allows you to quickly recognize the intended use of the new credentials. E.g. the name of the application that will be using it.
  4. Specify if the credentials should provide full access to your entire portal, a General credential set, or only things that are for a specific branding profile, a Branding specific credential set.
  5. If you chose "Branding specific credential set", choose the correct branding profile.
  6. Click "Generate".
  7. Check your e-mail inbox. Within a few minutes you should receive an e-mail containing the Client ID and Client Secret.

Be aware: the Client Secret is only provided once so keep this value somewhere safe.

Retrieving a token

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.

Request parameters in header

Content-Type : Set the value of this parameter to application/x-www-form-urlencoded.

Request parameters in body

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.

Response

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

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"
}

Using your token

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

Example code

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.