API

Get OAuth token

Returns an OAuth token. This is the final step of the flow. Authorization code exchange requires a valid code from the consent screen and the application's client_id. Confidential clients also authenticate with their client_secret.

Public clients send only the client_id and authenticate the authorization code with the PKCE code_verifier instead of a secret. Their refresh tokens are single-use: every refresh returns a new refresh token. Each public-client authorization creates an independent login; existing logins stay valid.

Client Authentication: The preferred method is HTTP Basic Authentication:

Authorization: Basic base64(client_id:client_secret)

For backwards compatibility, client_id and client_secret can also be passed as query parameters, but this is deprecated and will be removed in a future version.

POST/v1/hq/oauth/token

Query Parameters

client_id?stringDeprecated

Deprecated: Use HTTP Basic Authentication instead. Client ID of the application.

Example""
client_secret?stringDeprecated

Deprecated: Use HTTP Basic Authentication instead. Client secret of the application.

Example""
client_id?string
client_secret?string
grant_type*string
Value in"authorization_code" | "refresh_token" | "client_credentials" | "urn:ietf:params:oauth:grant-type:device_code"
code?string
Example"7awdXwZoedakjad37a"
refresh_token?string
Example"7awdXwZoedakjad37a"
scope?string

Space-delimited list of scopes to request. For client_credentials grant only. If omitted, all scopes allowed by the client are granted.

Example"companies:read events:read"
code_verifier?string

PKCE code verifier. Required for the authorization_code grant when the authorization request had a code challenge.

Example"dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"
redirect_uri?string

Required and must equal the authorization request redirect URI for public clients and PKCE flows.

Example"https://example.com"
device_code?string

The device_code returned when creating a sign-in code. Required for the device_code grant.

Example"nodc_GmRhmhcxhwAzkoEqiMEg_DnyEysNkuNhszIySk9eS"

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.noona.is/v1/hq/oauth/token" \  -H "Content-Type: application/json" \  -d '{    "grant_type": "authorization_code"  }'
{
  "token_type": "Bearer",
  "expires_at": "2020-08-24T14:15:22Z",
  "expires_in": 3600,
  "access_token": "7awdXwZoedakjad37a7awdXwZoedakjad37a7awdXwZoedakjad37a",
  "refresh_token": "7awdXwZoedakjad37a7awdXwZoedakjad37a",
  "scope": "user:read companies:read"
}
{
  "message": "Customer onboarding error."
}
{
  "error": "invalid_request"
}
{
  "message": "Customer onboarding error."
}
Empty