Usage example
You simply include the token in the Authorization header on every request, along with the X-API-Version
-header
Authorization: Bearer <YOUR-TOKEN>
The token returned from the
/authorize
endpoint expires in 15 minutes. You can get the time of expiration fromtimeExpiration
Example
The Authorization header, must be included on every request and be formatted as Bearer :
curl --location --request POST 'https://api.prod.kyc.penneo.com/public-api/graphql' \
--header 'X-API-Version: 1' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("X-API-Version", "1");
myHeaders.append("Authorization", "Bearer <TOKEN>");
myHeaders.append("Content-Type", "application/json");
var formdata = new FormData();
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: formdata,
redirect: 'follow'
};
fetch("https://api.prod.kyc.penneo.com/public-api/graphql", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));