Skip to main content
POST
/
oauth
/
token
Get Token
curl --request POST \
  --url https://api.m3ter.com/oauth/token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "grant_type": "client_credentials",
  "scope": "<string>"
}
'
{
  "token_type": "Bearer",
  "access_token": "eyJ0eXAiOiJKV1QiLCJwdCI6InNlcnZpY2UiLCJhbGciOiJSUzI1NiIsImtpZCI6InNlcnZpY2VVc2VyXzgxYzQ5YTU0LWRmY2QtNGRhNS1iYmYzLWQyODg1ZWMwMjVkZCJ9.eyJzdWIiOiIyOTA2ZDE4Zi1lNzFiLTRlMTAtOWJkNi1mZDA3YjUyNjM4ZjIiLCJwZXJtaXNzaW9ucyI6eyJNRUFTVVJFTUVOVFMjTUVBU1VSRU1FTlRTX1VQTE9BRCNJVEVNIyoiOnRydWV9LCJpc3MiOiJodHRwczpcL1wvbTN0ZXIuY29tXC9vYXV0aDIiLCJleHAiOjE2ODA1NDU3NTAsImlhdCI6MTY4MDUyNzc1MCwib3JnSWQiOiI4MWM0OWE1NC1kZmNkLTRkYTUtYmJmMy1kMjg4NWVjMDI1ZGQifQ.EwB-H4u7jKP5Ew8g0KwkPOBJPvuzDpayzWwyfm-kLPLPm9X3b3etQi1y3btKADYLy8WU452IbRFKgkhGBXrFN5rFR7mXLc1SUR-fU-anUNKCX-QPNrCzUyI2P1icQA2KFdvnYjJfLp5-gtCJWoX-Mf09-CFNPKC7sx0cVbro1Zd4axn6KpYi_48fufRYgoprwriYgpzkvG1Tq9SZtGU3vWex0eWFRKqHur6QwdxQzi_HM08kOb3puWqTio-7r3_sMOLkGitsg0teyJ-A-gYmOayZ4I2Nad7pmciLRh70kJYpR3L1yc82MPBIaJIYRxfWcOTnY8Opyv7ZlGm-hn2lUA",
  "expires_in": 18000,
  "scope": null
}

Authorizations

Authorization
string
header
required

m3ter supports machine to machine authentication using the clientCredentials OAuth2 flow.

The authorizationCode flow controls access for human users via the m3ter Console application.

Body

grant type and scope

grant_type
enum<string>
required

The grant type.

Available options:
client_credentials
Minimum string length: 1
scope
string

Not used. The JWT scope.

Response

Response containing access token detail

access_token
string
required

The access token.

expires_in
integer<int64>
required

Token expiry time in seconds.

token_type
string

The token type, which in this case is "bearer".

scope
string

Not used.