Developer Centre
Platform LoginStatus
  • Getting started
    • Integration types
    • Generating an authentication token
    • Using basic authentication
  • Applicants
    • Creating an applicant
    • Generating a verification link
    • Uploading documents to an applicant
      • Supported Documents and Types
    • Requesting to start the verification process
  • Applicant Results
    • Retrieving applicant verification results
      • Understanding applicant rejection labels
      • Setting up a webhook
    • Downloading verified documents
  • Entities
    • Check types and coverage
    • Creating an entity
    • Generating a verification link
    • Uploading documents to an entity
      • Supported Documents and Types
    • Linking a UBO to an entity
    • Requesting to start the verification process
  • Entity Results
    • Retrieving entity verification results
      • Understanding entity rejection labels
      • Setting up a webhook
    • Retrieving entity ownership structures
    • Retrieving entity questionnaire answers
  • Anti-Money Laundering
    • Retrieving AML results
  • Database Verification
    • Applicants
      • Verifying applicant identity data
    • Entities
      • Verifying entity information
  • Pages
    • Overview
    • Creating a Page
    • Verifying with Pages
  • Domain Names
    • Overview
    • Linking your domain
  • Flow Logic
    • Overview
  • Workspaces
    • Switching Workspaces
  • Modules
Powered by GitBook
On this page

Was this helpful?

  1. Getting started

Generating an authentication token

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

Request

curl --location 'https://enterprise.personr.co/api/1.1/wf/api-token-generate' \
--form 'email="example@personr.co"' \
--form 'password="example123"'
var axios = require('axios');
var FormData = require('form-data');
var data = new FormData();
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 = new FormData();
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);
});
require "uri"
require "net/http"

url = URI("https://enterprise.personr.co/api/1.1/wf/api-token-generate")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
form_data = [['email', 'example@personr.co'],['password', 'example123']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
import requests

url = "https://enterprise.personr.co/api/1.1/wf/api-token-generate"

payload={'email': 'example@personr.co',
'password': 'example123'}
files=[

]
headers = {}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)

Response

{
  "status": "success",
  "response": {
    "token": "1670035114445x631333625381113500",
    "user_id": "1665086295388x405886519539808060",
    "expires": 31536000
  }
}
{
    "statusCode": 400,
    "reason": "INVALID_LOGIN_CREDENTIALS",
    "message": "We didn’t find an account with those login credentials",
    }

In the response, you'll receive:

  • Your bearer token

  • Your unique user id

  • The expiration time of your token, expressed in seconds

Remember to include your token in the header of every subsequent API call, in the format Authorization: Bearer YOUR_TOKEN

Don't forget to set up a workflow to renew your token before it expires.

PreviousIntegration typesNextUsing basic authentication

Last updated 10 months ago

Was this helpful?