Authentication

REST API works on a token-based authentication system. This is unlike sessions.

To begin:

  • Find the Client Secret for the authorisation header from the Service > Adapters > REST API page within the Diffusion® Cloud dashboard.

client details

With this, you can request an authentication token from Diffusion® Cloud. If authentication is successful, the returned token will be used to authenticate any subsequent requests.

curl --request POST                                                                     \
     --url https://login.diffusion.cloud/oauth2/token?grant_type=client_credentials     \
     --header 'content-type: application/x-www-form-urlencoded'                         \
     --header 'authorization: Basic <CLIENTSECRET>'
Authentication API

Endpoint

https://login.diffusion.cloud/oauth2/token

Content-type

application/x-www-form-urlencoded

Authorization

Basic <CLIENTSECRET>

Method

POST

Authentication parameters
Parameter Optional? Description

grant_type

No

OAuth grant type. Must be set to client_credentials

Authentication response status
Code Description

200

The authentication token was generated successfully.

400

There was a problem authenticating. See message for more details

In a successful authentication, the authorisation token can be found in the token response field.