{"templateId":"openapi_docs","sharedDataIds":{"openAPIDocsStore":"oas-api-reference/index.yaml","sidebar":"sidebar-api-reference/sidebars.yaml"},"props":{"definitionId":"api-reference/index.yaml","dynamicMarkdocComponents":[],"baseSlug":"/api-reference","seo":{"title":"OAuth Token","siteUrl":"https://docs.wise.com","projectTitle":"Wise Platform","description":"Exchange client credentials or authorisation grants for OAuth 2.0 access tokens. All grant types use `POST /oauth/token` with basic authentication (your `client_id` and `client_secret`).\n\nDepending on the grant type, this endpoint issues either a **client credentials token** or a **user token**.\n\nClient credentials token {% .title-3 .m-t-5 %}\n\nAn application-level token for requests that aren't tied to a specific Wise user, such as generating un-authenticated quotes and subscribing to application webhooks. Valid for 12 hours.\n\n- `client_credentials` — the only grant type for this token.\n\nUser token {% .title-3 .m-t-5 %}\n\nA token for making API calls on behalf of a specific Wise user, such as creating transfers and managing balances. Access tokens are valid for 12 hours and can be refreshed using a refresh token. Grant types:\n\n- `registration_code` — for partners that create Wise users via API. Exchanges a registration code for a user access token and refresh token.\n- `authorization_code` — for partners using the OAuth redirect flow. Exchanges an authorisation code for a user access token and refresh token.\n- `refresh_token` — obtain a new user access token without requiring the user to re-authorise.\n\nManaging token expiration {% #managing-token-expiration .title-3 .m-t-5 %}\n\nAccess tokens are valid for 12 hours. You can request a new access token whenever it's close to expiring — there is no need to wait for the actual expiration to happen first. Depending on how your application uses the Wise Platform API, requesting a new access token before attempting a series of API calls on behalf of an individual user will avoid issues with expired access tokens.\n","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"itemId":"oauth-token","disableAutoScroll":true,"metadata":{"subType":"openapi-operation"},"compilationErrors":[],"markdown":{"partials":{},"variables":{"rbac":{"teams":["anonymous"]},"user":{},"remoteAddr":{"hostname":"docs.wise.com","port":4000,"ipAddress":"216.73.217.135"},"lang":"default_locale","env":{"PUBLIC_REDOCLY_BRANCH_NAME":"main"}}},"pagePropGetterError":{"message":"","name":""}},"slug":"/api-reference/oauth-token","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}