Get access token
The OAuth 2.0 token endpoint of the data space endpoints of an organisation (the token_endpoint of its authorisation server metadata). A party that has an OAuth 2.0 client of the organisation, for example your data marketplace, gets an access token here with the client_credentials grant. The token works for 1 hour at POST .../get-verification-request and POST .../post-verification-request of the same organisation. No API key: the client credentials authenticate the call.
Send the client credentials as HTTP Basic authentication (Authorization: Basic <base64 of client_id:client_secret>) or as the form fields client_id and client_secret, not both. The credentials of an OAuth 2.0 client of the organisation (POST /v4/config/consent/data-space/oauth2-client) and the client credentials of a connected organisation work. A new token for a client replaces the token that the client got before: the earlier token stops working.
The service of a data using service uses the grant urn:ietf:params:oauth:grant-type:jwt-bearer with an assertion when it pulls data (POST /v4/service/consent/data-space/pull-data). That access token is a JWT for the API of the data source; the data source checks it with POST /v4/service/consent/data-space/validate-access.
Send the body as application/x-www-form-urlencoded, with no other value in the Content-Type header (no charset).
Errors have the OAuth 2.0 form (error, error_description), except 403:
400invalid_request: the organisation does not exist, the form is not valid, both authentication methods are there, or theassertionis missing or not valid.400unsupported_grant_type: another grant type.401invalid_client: no or unknown client credentials (with aWWW-Authenticateheader).401unauthorized_clientorinvalid_token: the service refused the assertion (signature, expiry, ajtithat was used before, a record that is not opted in).403: the organisation is suspended. The body is{"errorCode": 403, "errorDescription": "organisation_suspended"}.415invalid_request: theContent-Typeis notapplication/x-www-form-urlencoded.
Authorizations
Public. The operation takes no credentials.
Path parameters
organisationId stringrequiredThe ID of the organisation
Body
grant_type enum<string>requiredclient_credentialsfor a client of the organisation.urn:ietf:params:oauth:grant-type:jwt-beareris for the pull data call of a data using service.Available options:
client_credentials,urn:ietf:params:oauth:grant-type:jwt-bearerclient_id stringClient ID, when you do not use HTTP Basic authentication. Only for
client_credentials.client_secret stringClient secret, with
client_id. Only forclient_credentials.assertionstringThe signed JWT about the data disclosure agreement record. Mandatory for
urn:ietf:params:oauth:grant-type:jwt-bearer.
Response
The access token. The answer has the headers Cache-Control: no-store and Pragma: no-cache.
access_token stringThe access token. Send it as
Authorization: Bearer <token>.token_type enum<string>Always
Bearer.Available options:
Bearerexpires_in integerLifetime of the token in seconds. Always
3600.scopeenum<string>Always
verify, for both grant types.Available options:
verify