API Key Login
POST/api/login
To call the API with an API Key, first issue an API call to the backend to receive a short-lived bearer token.
Send a request to /api/login with the following keys in the body of the request. You can use either the x-www-form-urlencoded format or the application/json format:
- For
x-www-form-urlencoded, provide the parametersclient_id,client_secret, andgrant_typein the request body. This variant will respond with a redirect to meshStack's IdP. You must configure your client to follow the redirect or handle it manually. - For
application/json, provide a JSON object withclientIdandclientSecretfields. This variant will respond directly with an access token and related fields, without a redirect. We recommend using the JSON variant for most integrations.
Choose the format that best fits your integration scenario, but prefer the JSON variant for simplicity and direct access to the token.
Request
Responses
- 200
- 307
200
307