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
- 400
- 401
- 403
- 406
- 415
The access token of the API key
Redirects to the token endpoint of meshStack's IdP.
The request is malformed, or meshStack's IdP rejected it.
meshStack's IdP does not know the key ID, or the key secret is wrong.
API keys are not enabled for this meshStack.
The Accept header names no media type of this operation, or a version that is no longer supported.
The Content-Type header names no media type that this operation accepts.