API

Get OAuth token

Returns an OAuth token. This is the final step of the flow. Needs a valid authorization code that was generated from the consent screen. Also needs the client_id and client_secret of the application.

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?string

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

Example""
client_secret?string

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

Example""
grant_type*string
Formatenum
Value in"authorization_code" | "refresh_token"
code?string
Example"7awdXwZoedakjad37a"
refresh_token?string
Example"7awdXwZoedakjad37a"

Response Body

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",
  "access_token": "7awdXwZoedakjad37a7awdXwZoedakjad37a7awdXwZoedakjad37a",
  "refresh_token": "7awdXwZoedakjad37a7awdXwZoedakjad37a"
}