Post Bearer Token
To use Bearer Token Authentication, you first need to do POST request for a valid Bearer Token using valid API Client.
Bearer Token will expire after some time.
POST authentication/token
Request properties
Property | Type | Description | Optional |
---|---|---|---|
username | string | Username to use. | No |
password | string | Password to use. | No |
officeCode | string | Office Code to use. | No |
clientId | Guid | API Client Id to use. | No |
clientSecret | string | API Client Secret to use. | No |
Example request
{ Username : "Bob", Password : "BobsPassword!", OfficeCode : "B@sec0ne", ClientId : "00000000-0000-0000-0000-000000000000", ClientSecret: "BobsClientSecret" }
Response
Upon successful creation of a Bearer Token, a 200 status code will be returned and a Bearer Token, otherwise an error message with failure details.
Example response
{ "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6ImEzck1VZ01Gdjl0UGNsTGE2eUYzekFrZnF1RSIsImtpZCI6ImEzck1VZ01Gdjl0UGNsTGE2eUYzekFrZnF1RSJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjQ0MzAwLyIsImF1ZCI6Imh0dHA6Ly9sb2NhbGhvc3Q6NDQzMDAvcmVzb3VyY2VzIiwiZXhwIjoxNDgzMDIzNDU3LCJuYmYiOjE0ODMwMTk4NTcsImNsaWVudF9pZCI6ImI5MzQ0MzU2LTA3NzYtNDkzOS1hODg1LWMyMmNkMDcyNDUyOCIsInNjb3BlIjoib3BlbmlkIiwic3ViIjoiNzc2NTM3ODItMThmNi00YzYxLThlYjAtOWJkYmYxYTRkZjJlIiwiYXV0aF90aW1lIjoxNDgzMDE5ODU3LCJpZHAiOiJpZHNydiIsImp0aSI6IjNkMjg3Nzc5MWViZDcyMzBiZGZhZDNhMmY5MjQ1OTk2IiwiYW1yIjpbInBhc3N3b3JkIl19.W-T1Dh0vPyKCxs5Uu1n-GFME1pW1xPFdyaP2G7hMfmhVyshCBPKXVjNg7zPk9InN4OSySaHeOMq2-9xV0Eobnnahxb-97xwRCwnoVRn0LyGQ05CJiQWf7ch_fy1N8xbYOP-Oj0CrZCmSBNpCvt_1l-fWs3exVRINtceQBygQQGtsPE6Ud7WsSFAtoOMlpzkTv-i-GFHevTf5LL-1M0nTMr3JIMqaSj6RBMZagzYkWvpB1umyV-4BwxHguEfeouT2uMhIGQi1vuV0emwaHoEf8yBL-2jK3wL-FRQ0pQ5bWvDW7BQcM2qWnMSqZr0UI6szp5IRw-gXPDNZNpW87nzQWQ" }
Possible error responses
Status code | Error code | Details |
---|---|---|
400 | invalid_request_payload | One or more properties were not valid. |