Let's start by generating an Authorization Bearer token to use with subsequent endpoints.
Before calling other endpoints, you need to generate an Authorization Bearer token. To retrieve your token, simply send your account credentials as body parameters.
This works just like logging into the Personr platform, but instead of being redirected to your dashboard, you will receive a token that allows you to authenticate and call other endpoints.
Generate a bearer token
POST/api-token-generate
Generate a token for use with other endpoints.
Name
Value
Content-Type
multipart/form-data
Body
Name
Type
Description
email
string
The email you use to login to your Personr account
password
string
The password you use to login to your Personr account
var axios =require('axios');var FormData =require('form-data');var data =newFormData();data.append('email','example@personr.co');data.append('password','example123');var config = { method:'post',maxBodyLength:Infinity, url:'https://enterprise.personr.co/api/1.1/wf/api-token-generate', headers: { ...data.getHeaders() }, data : data};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
var form =newFormData();form.append("email","example@personr.co");form.append("password","example123");var settings = {"url":"https://enterprise.personr.co/api/1.1/wf/api-token-generate","method":"POST","timeout":0,"processData":false,"mimeType":"multipart/form-data","contentType":false,"data": form};$.ajax(settings).done(function (response) {console.log(response);});