Create an M2M access token

Exchange active Penny machine-application credentials for an access token using the OAuth 2.0 client-credentials grant.

Request

This endpoint expects an object.
grant_typeenumRequired
Allowed values:
client_idstringRequired
client_secretstringRequiredformat: "password"

Response

The M2M access token.
access_tokenstring
Bearer token to send in the Authorization header of API requests.
expires_ininteger
The lifetime in seconds of the access token.
token_typestringOptionalDefaults to Bearer
The type of the token issued.
refresh_tokenstring or nullOptional
The refresh token which can be used to obtain new access tokens.

Errors

400
Bad Request Error
401
Unauthorized Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error