Get an OAuth2 bearer token
POST/token
MGP uses OpenID Connect and the majority of MGP API calls require Bearer Token authentication. This example shows a basic Oauth 2 password flow call that can be used to acquire an access token that then can be sent in the Bearer Token parameter. This endpoint can be used for other Oauth flows such as refresh-token
but those calls are not demonstrated here.
Request
- application/x-www-form-urlencoded
Body
client_id stringrequired
Possible values: [mgp
]
grant_type stringrequired
Possible values: [password
]
username stringrequired
password stringrequired
Responses
- 200
OK
- application/json
- Schema
- Example (from schema)
- Example
Schema
- object
{}
{
"access_token": "string of token",
"expires_in": 36000,
"refresh_expires_in": 1800,
"refresh_token": "string of refresh token",
"token_type": "Bearer",
"id_token": "string of id token",
"not-before-policy": 0,
"session_state": "session state",
"scope": "string of scope details"
}
Loading...