> For the complete documentation index, see [llms.txt](https://docs.qiro.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.qiro.fi/developer-section/openapi-spec/authentication/obtain-an-access-token.md).

# Obtain an access token

Authenticate using HTTP Basic with the Qiro-issued client ID and client secret. Access tokens are short-lived and must not be sent to the SDK as a long-lived secret.

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"tags":[{"name":"Authentication","description":"Partner authentication using OAuth 2.0 client credentials."}],"servers":[{"url":"/","description":"Qiro API host supplied to the partner during onboarding."}],"security":[{"clientCredentialsBasic":[]}],"components":{"securitySchemes":{"clientCredentialsBasic":{"type":"http","scheme":"basic","description":"Qiro-issued OAuth client ID and client secret."}},"schemas":{"OAuthTokenResponse":{"type":"object","additionalProperties":false,"required":["access_token","token_type","expires_in","scope"],"properties":{"access_token":{"type":"string","minLength":1},"token_type":{"type":"string","const":"Bearer"},"expires_in":{"type":"integer","const":900},"scope":{"type":"string","description":"Space-delimited scopes granted to the OAuth client; grants may be narrower than the complete API surface."}}},"ErrorResponse":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code."},"message":{"type":"string","description":"Safe human-readable explanation."},"request_id":{"type":"string"},"correlation_id":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":true},"issues":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"BadRequest":{"description":"Invalid schema, field format, or correlation identifier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InvalidClient":{"description":"Client credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/oauth/token":{"post":{"tags":["Authentication"],"operationId":"createOAuthToken","summary":"Obtain an access token","description":"Authenticate using HTTP Basic with the Qiro-issued client ID and client secret.\nAccess tokens are short-lived and must not be sent to the SDK as a long-lived secret.\n","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","additionalProperties":false,"required":["grant_type"],"properties":{"grant_type":{"type":"string","const":"client_credentials"}}}}}},"responses":{"200":{"description":"A short-lived partner access token.","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}},"Pragma":{"schema":{"type":"string","const":"no-cache"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokenResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidClient"}}}}}}
```
