Version: v1.0
Authentication
Secure access to our APIs using either API keys or OAuth 2.0. This section explains the available authentication methods, how to obtain credentials, and how to authorise requests to securely access protected resources.
- API Key
- OAuth 2.0
API keys can be generated on the user settings page in Nucleus and supplied with requests to authorise against our API.
| Header parameter | X-API-Key |
|---|
Example Request
curl -X GET \
-H "Content-Type: application/json" \
-H "X-API-Key: <api-key>" \
"https://api.bohr.uk/v1/"
OAuth 2.0 authorization code flow.
| Token URL | https://bohrnucleus.ciamlogin.com/d13d14e4-93b3-40e1-a033-ba275880dda/oauth2/v2.0/token |
|---|---|
| Authorization URL | https://bohrnucleus.ciamlogin.com/d13d14e4-93b3-40e1-a033-ba275880dda/oauth2/v2.0/authorize |
| Scopes | b9b6ffdd-a36f-4088-aa1b-91d443e0b588/.default |
Obtain Access Token
curl --request GET \
-H "Content-Type: application/x-www-form-urlencoded" \
-d grant_type=client_credentials \
-d client_id=<client id> \
-d client_secret=<client secret> \
-d scope=b9b6ffdd-a36f-4088-aa1b-91d443e0b588/.default \
"https://bohrnucleussandbox.ciamlogin.com/d13d14e4-93b3-40e1-a033-ba275880dda/oauth2/v2.0/token"
Example Request
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <access token>" \
"https://api.bohr.uk/v1/roles"