Authorization

Authentication Methods There are two ways of sending data to generate an access token: specifying a request header or sending the credentials as a JSON request. In both cases, we respond with a content type of application/json. The token to be used in subsequent requests can be parsed from access_token in the JSON response.

Basic Auth: Like standard Basic Auth, the credentials must be passed as colon separated string (client_id:client_secret) that is Base64 encoded. Please note that you must still specify the grant_type in the http post body or as a request parameter.

JSON Auth: Please remember to set the Content-Type header to application/json when providing the authentication details as JSON body.

A succesful authentication will return a bearer code

{
"username":"realbookers",
"password":"super-complicated-not-to-guess"
}

Headers

Every Request to the backend should be accompaigned by the appropriate headers. The following 2 headers are required and recommended to be added on every request.

HeaderValue
Content-Typeapplication/json
Acceptapplication/json

Once a user is authenticated succesfully (status is returned to be 200), a token will be generated and returned in a JSON body under the key: "access_token ". Subsequent requests to the backend will need to include this token as well.

HeaderValue
Content-Typeapplication/json
Acceptapplication/json
AuthorizationBearer eyJlbmMiOiJBMTI4R0NNIiwiYWxnIjoiUlNBLU9BRVAifQ.JoDcO1sH9lBG3IyEXw2JqLH132dC4WQER1_1nA0dueRhjYimV2lcdogePYBnv7A4VJ5AR3erUQJN4incMje8sPxyaL1qkY6ln-JPIC_4zKvVQgkgLNtI4qrQcCnogVnXflnd8-VYXjhHIW1Z_WfG0SUA5MRnGx1B_RMOTzPVD60.Ux0HaY8WjBTXNo4R.cXDMZh2AOWCVI3vfiNCDPMeURCgVQJ1JY_lScZ3mt1b_Tr6gqsvTR_azxlQJ4alzLZ6J20o3Ugagu6xpd4oqDB7KWn5RFvM9vNnQZH1qkmF3n75W6oRBIfSgjBDPk6FvDjIjXAzPgJq3ZdeTfAdv04G6OgR7cmBLg7Dnm1nRv3aTJ4OgRK05tlvhb9y0yJ0KVRcsrZ7lLMJ3-BBZOfKBXiPvRUoj0A43vE2Y5csYZsNQUe9oDiYui1AtGrkgRqSAbHJTrHN0YCABk32M5_3gVECQ_C2CJKsJRbw9ycrQvCq2KovY1Wd2rYIUTmE61rwFEJ0Bxk5d-z6jyVYh8qLV7M5uIL0hc5mJilR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