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.
/v1/hq/oauth/tokenQuery Parameters
Deprecated: Use HTTP Basic Authentication instead. Client ID of the application.
""Deprecated: Use HTTP Basic Authentication instead. Client secret of the application.
"""authorization_code" | "refresh_token" | "client_credentials" | "urn:ietf:params:oauth:grant-type:device_code""7awdXwZoedakjad37a""7awdXwZoedakjad37a"Space-delimited list of scopes to request. For client_credentials grant only. If omitted, all scopes allowed by the client are granted.
"companies:read events:read"PKCE code verifier. Required for the authorization_code grant when the authorization request had a code challenge.
"dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"Required and must equal the authorization request redirect URI for public clients and PKCE flows.
"https://example.com"The device_code returned when creating a sign-in code. Required for the device_code grant.
"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."
}