Skip to main content

Request an access token

POST 

/oauth/token

Returns an access token for the end user

Request

Body

required
    grant_type stringrequired

    Possible values: [authorization_code, password, refresh_token]

    Which grant type to use

    authorization_code and refresh_token are used by most clients

    password is only available with prior approval from VATSIM

    client_id stringrequired

    Client ID

    client_secret passwordrequired

    Client secret

    redirect_uri string

    Redirect URI (must match the one provided in the authorization request)

    code string

    Authorization code returned in the callback from the server

    Required when using the authorization_code grant

    scope string[]

    Possible values: [full_name, email, vatsim_details, country]

    Requested scopes

    Required when using the password grant
    Optional when using the refresh_token grant

    username string

    VATSIM ID of the user to authenticate

    Required when using the password grant

    password password

    Password of the user to authenticate

    Required when using the password grant

    refresh_token string

    Refresh token issued in the original access token request

    Required when using the refresh_token grant

Responses

Successful operation

Schema
    token_type string

    Possible values: [Bearer]

    Token type

    expires_in integer

    Access token lifetime (secs)

    access_token string

    Access token (validity specified in expires_in)

    refresh_token string

    Refresh token (valid for 30 days)

    scopes string[]

    Possible values: [full_name, email, vatsim_details, country]

    Granted scopes

Loading...