> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/push-provisioning/ja/integrate-the-d1-api/d1-api-reference/outbound-api-from-d1/oauth2-api.md).

# OAuth2 API

## Get Authorization Token

> This request is used by Thales to retrieve an OAUTH 2.0 access authorization token to be used for outgoing issuer API requests.

```json
{"openapi":"3.0.0","info":{"title":"D1 OAuth API","version":"1.0"},"servers":[{"url":"https://YOUR_DOMAIN/authz/d1/v1"}],"paths":{"/oauth2/token":{"post":{"description":"This request is used by Thales to retrieve an OAUTH 2.0 access authorization token to be used for outgoing issuer API requests.","parameters":[{"schema":{"type":"string"},"in":"header","name":"authorization","description":"The authorization header includes a client secret in base64URL encoded format following this syntax: Basic \"[clientId:client secret]\" as per https://www.rfc-editor.org/rfc/rfc2617","required":true}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/auth2Request"}}}},"responses":{"200":{"description":"Default allowed response","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","description":"The access token issued by the authorization server","readOnly":true},"expires_in":{"type":"string","description":"Remaining time in seconds for the access_token to expire.","readOnly":true},"scope":{"type":"string","description":"Scope of the access_token.","readOnly":true},"token_type":{"description":"Type of the access_token that will be used to call Issuer APIs.","enum":["Bearer"]},"expires_at":{"type":"string","description":"Access token expiration timestamp","readOnly":true}},"required":["access_token","token_type"]}}}},"400":{"description":"Bad request"}},"summary":"Get Authorization Token","operationId":"getAccessToken"}}},"components":{"schemas":{"auth2Request":{"type":"object","title":"Authorization request body","properties":{"grant_type":{"type":"string","enum":["client_credentials"]},"scope":{"description":"Access request scope as optionally defined by the issuer ","type":"string"}},"required":["grant_type"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/push-provisioning/ja/integrate-the-d1-api/d1-api-reference/outbound-api-from-d1/oauth2-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
