All API endpoints (unless otherwise noted) will require authentication. Authentication is performed through having a valid Authorization: Bearer ${token} header in the request. A bearer token may be retrieved through a standard OAuth2 flow.

Developers seeking to access the XIVAuth API will need to define an OAuth client in the XIVAuth Developer Portal prior to being able to access the API. Depending on scopes requested, an access review may apply before an OAuth client is enabled. A reference of available scopes can be found in the OAuth Scopes page.

Authorization Code Flow

Authorization Request URL: /oauth/authorize

XIVAuth supports a standard Authorization Code flow, with support for PKCE. To authenticate, the OAuth client will generate an OAuth request and redirect the user to XIVAuth’s Authorization URI. The user will then authenticate, approve scopes, and be redirected back to the OAuth client with a code that may be exchanged for a proper OAuth token.

When using the Authorization Code flow, applications must either provide their client_secret upon token redemption or use PKCE. Applications that purely perform authentication in an untrusted environment (e.g. a desktop app or an SPA) must use PKCE to ensure security. Clients may use PKCE in addition to client_secret, if so desired.

The Authorization Request URL supports the following parameters passed in as query params:

Client Credentials Flow

A limited set of API resources may be accessed via the Client Credentials flow for machine-to-machine communication. Examples of these endpoints include JWT validation and control endpoints. APIs that return or handle user data are not available when using a Client Credentials flow, as there is no associated user with that OAuth token.

To use the Client Credentials flow, a POST request must be made to the Token Request Endpoint (/oauth/token) with the following parameters:

$ curl -X POST --url '<https://xivauth.net/oauth/token>' \\
		--header 'content-type: application/x-www-form-urlencoded' \\
		--data 'grant_type=client_credentials' \\
		--data 'client_id=APP_CLIENT_ID' \\
		--data 'client_secret=APP_CLIENT_SECRET'

Device Authorization Flow