Using basic authentication
Instead of sending account details as body parameters, you can use basic authentication to generate a bearer token instead.
Before calling other endpoints, you need to generate an Authorization Bearer token. To retrieve your token using basic auth, simply send your account credentials in base64 encoded format within the header.
The format should be Basic email:password where email:password are encoded.
This token has a lifetime of 1 year, and is invalidated whenever a new token is generated.
The token is attached to the user credentials it was created with and as such it is recommended to create a service account for applications and use those credentials for token generation.
Generate a bearer token using basic authentication
POST
/api-basic-auth
Generate a token for use with other endpoints.
Header
Content-Type
multipart/form-data
Authorization
Basic (base64 string)
Request
curl --location 'https://enterprise.personr.co/api/1.1/wf/api-basic-auth' \
-H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ="
Response
{
"status": "success",
"response": {
"token": "bus|4242424242424x424242424242424242|4343434343434x434343434343434343",
"user_id": "4242424242424x424242424242424242",
"expires": 31536000
}
}
In the response, you'll receive:
The bearer token
The unique user id
The expiration time of your token, expressed in seconds
Last updated
Was this helpful?