Menu

REST API authentication

This document will help you understand how the ticket API and the content REST API’s works.

Before you can made any REST API requests, you need to obtain an access token. You will get a valid access token (it's called a ticket) by using a ticket API. This a valid access token must be sent in the API request custom header element (named x-api-key or ticket, we prefer x-api-key).

Ticket API endpoints

  • https://api-test.bisnode.fi/permission/v1/ticket - test environment
  • https://api.bisnode.fi/permission/v1/ticket - production environment

In order to use the API you must have a valid environment specific username and password. All API requests must be made over HTTPS.

cURL request example

curl 'https://api-test.bisnode.fi/permission/v1/ticket' -u ABCDEFGH:12345abc

successful request - Status code 200

If you have a valid username and password the request will be successful.

{
    "username": "123456",
    "endusername": "ABCDEFGH",
    "fullName": "Test User",
    "ipAddress": ";172.25.172.45;213.214.146.129:32935",
    "ticket": "1234567890ABCDEFGHIJ",
    "languageCode": "en",
    "exception": null,
    "passwordExpires": null,
    "passwordExpired": false,
    "loginWithEmail": false
}

This is the valid access token.

    "ticket": "1234567890ABCDEFGHIJ"
Failed request - Status code 401

If you don't have a valid username and password, or the user credentials are misspelled.

Login failed

 


 

How to use the ticket?

The ticket parameter must be sent in the request custom header element. If the ticket value is valid then API request will be successful (http status code 200), otherwise it will fail (http status code 401).

How long does a ticket last?

A ticket is valid for 20 minutes, after that it will automatically expire.

How to get a new valid ticket?

Ticket API returns a new valid ticket.

Tulosta

Läs mer om våra tjänster på www.bisnode.com Bisnode