Basic Auth
Access Aidbox API from your Service
Last updated
Access Aidbox API from your Service
Last updated
The simplest way to programmatically interact with Aidbox API is to use Basic Access Authentication. In this scheme you provide client credentials with every HTTP request in the special header - Authorization: Basic <credentials>
, where <credentials>
is the base64 encoding of Client.id and Client.secret joined by a colon:
The easiest way to test Basic Auth is to run through the Aidbox Sandbox UI (Auth -> Sandbox -> Basic Auth).
The first step is to create resource Client with id & secret and add 'basic'
to it's grant_types
collection:
By default, your client does not have any permissions to access Aidbox REST API. So you probably want to configure some using Aidbox Access Policy. Access Policy can be linked to the specific client by providing the reference to clients in link
collection. For more sophisticated configuration, see Access Policies documentation.
Now you can make HTTP requests with Authorization
header set to 'Basic ' + base64(client.id +':' + client.secret):
Example with curl:
Most HTTP clients will do Authorization
header construction for you: