External applications use OAuth 2.0 Authorization Code with PKCE to obtain a User API access token. Arcane handles WorkOS sign-in and organization selection. Arcane provides your client ID, registered redirect URIs, authorization server location, and User API location during onboarding. These values are available upon request.

OAuth methods

Authorization request

Redirect the user to the authorization endpoint with: Arcane redirects to the registered URI with code and state after the user signs in and selects an organization.

Token request

Send an application/x-www-form-urlencoded request to the token endpoint.
The response contains access_token, token_type, and expires_in. It also contains refresh_token when you requested offline_access. To renew access, call the same token endpoint with grant_type=refresh_token, client_id, and refresh_token.

Call the User API

Send the access token as a bearer token. The token selects the user and organization. You cannot override either value in a User API request.
OAuth authenticates the calling user. Arcane permissions still determine which methods and resources that user can access. For the security rationale behind PKCE, redirect validation, audience restriction, and refresh-token rotation, read the OAuth 2.0 Security Best Current Practice.