cURL
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 }
Get authentication token
m3ter supports machine to machine authentication using the clientCredentials OAuth2 flow.
clientCredentials
The authorizationCode flow controls access for human users via the m3ter Console application.
authorizationCode
grant type and scope
The grant type.
client_credentials
1
Not used. The JWT scope.
Response containing access token detail
The access token.
Token expiry time in seconds.
The token type, which in this case is "bearer".
Not used.