API Integration
Related Articles
Create a Secure Psychometric Session
The JWT Token is the security mechanism that is leveraged by the Begini Platform. In order to get an access token, you need to invoke the API below.
URL
https://api.begini.co/v1/sessions-management/tokens
Method
POST
Please Note
Remember the Integration ID and API Key is located in the Deployment Centre for each product you are using. Please also remember there are Test and Production version of both the Integration ID and API Key and these need to be adjusted before you start processing live applications through the platform.
Sample Request
Headers
Parameter | Description | Required? |
api-key |
An API Key is used to identify and authenticate your web app that is making the call to Begini APIs. Your API Key can be found in your Begini Dashboard account with the deployment centre and is unique per deployment and test/production. |
YES |
Request Body
Parameter | Description | Type | Required? |
uid | Whatever you're using to uniquely identify your customer – usually alphanumeric, see the Unique ID Guide in the overview section. | String | YES |
integration_id |
An integration ID is what identifies your web app that integrates with the Begini Platform and it is used to obtain access tokens for your customers
Your integration ID can be found in your Begini Dashboard account. |
String | YES |
The result of this request will be an access token and a url.
curl --location --request POST 'https://api.begini.co/v1/sessions-management/tokens' \
--header 'Content-Type: application/json' \
--data-raw '{
"uid": "QWERT-YUIOP-ASDFGH",
"integration_id": "1234567890987654321"
}'
Sample response
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiI1YTYwMWE5OC0zMWY4LTRmMWQtYTFkYi1hMWYwOTE0NzQ3OWUiLCJjb21wYW55X2lkIjoiNjIxMzcxODNlODc3NzA0YjA2ZmFiMGVmIiwiaW50ZWdyYXRpb25faWQiOiI2MjEzNzE4M2U4Nzc3MDRiMDZmYWIwZjIiLCJ1cmwiOiJodHRwczovL2FwaS5iZWdpbmkuY28vbWFzdGVyL3BzeWNob21ldHJpY3MiLCJleHAiOjE2NDU2Mjg0ODJ9.pNOW0igENm1svfkF_ssXwRylN4ZkN6RlkyG5SFkIobK",
"url": "https://api.begini.co/master/psychometrics"
}
You need to save the access token because you will use this token to redirect your customer to the psychometric assessment.
Psychometric Redirect URL
Once you have the access token, you must send the token via an HTTP redirect using the token string as part of the URL, like so:
https://app.psychometric.me/
{access_token}
Note
Please change the highlighted portion to the actual access token you received from the response.