🔐 Authentication
How to get a bearer token
Our API uses OAuth2 Client Credentials Grant. You must have a valid bearer token to interact with it.
To get a token you must make a POST to: https://login.microsoftonline.com/fairleaonline.com/oauth2/v2.0/token
You will need to specify the following credentials to request a token.
If you do not know your credentials or to request new ones, please contact us via the Support Tab.client_id : {Issued by fairleaonline}
scope : {Issued by fairleaonline}
client_secret : {Issued by fairleaonline}
grant_type : client_credentials
Example HTTP:
POST /fairleaonline.com/oauth2/v2.0/token HTTP/1.1
Host: login.microsoftonline.com:443 Content-Type: application/x-www-form-urlencoded
client_id={client_id}
&scope={scope}
&client_secret={client_secret}
&grant_type=client_credentials
Example Curl:
curl --location 'https://login.microsoftonline.com/fairleaonline.com/oauth2/v2.0/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id={{client_id}}' \
--data-urlencode 'scope={{scope}}' \
--data-urlencode 'client_secret={{client_secret}}' \
--data-urlencode 'grant_type=client_credentials'
Once you have your token you can add it to the authorisation
Authentication Error Response
If parts of the authentication request are missing, malformed, or invalid, you will receive an HTTP 400 Bad Request or HTTP 401 Unauthorized response code. If you have lost your credentials please contact support.