POST
/
oauth
/
token
curl --request POST \
  --url https://api.nomos.energy/oauth/token \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "grant_type": "authorization_code",
  "code": "4/P7q7W91a-oMsCeLvIaQm6bTrgtp7",
  "refresh_token": "1B4a2e77838347a7E420ce178F2E7c6912E169246c",
  "scope": "<string>",
  "code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"
}'
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlcyI6WyJhZG1pbiJdLCJwYJ0bmVyIjoi...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "21cc84a3ad98736f4e5eddc88a1f4b58a29ae96206027c9b59d874cb2a7f7e02"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
The token request
grant_type
enum<string>
required

The OAuth 2.0 grant type being used for the token request

Available options:
authorization_code,
refresh_token,
client_credentials
Example:

"authorization_code"

code
string

The authorization code received from the authorization server (required for authorization_code grant type)

Example:

"4/P7q7W91a-oMsCeLvIaQm6bTrgtp7"

refresh_token
string

The refresh token used to obtain a new access token (required for refresh_token grant type)

Example:

"1B4a2e77838347a7E420ce178F2E7c6912E169246c"

scope
string
code_verifier
string

PKCE code verifier used to verify the authorization request (required when PKCE was used in authorization request)

Example:

"dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"

Response

200
application/json
Retrieve the quote details
access_token
string
required

The access token to access the API endpoints

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlcyI6WyJhZG1pbiJdLCJwYJ0bmVyIjoi..."

token_type
enum<string>
required

The type of token issued, always 'Bearer'

Available options:
Bearer
Example:

"Bearer"

expires_in
number
required

The lifetime of the access token in seconds (60 minutes)

Example:

3600

refresh_token
string
required

The refresh token to create a new access_token

Example:

"21cc84a3ad98736f4e5eddc88a1f4b58a29ae96206027c9b59d874cb2a7f7e02"