Skip to main content

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 parameters client_id, client_secret, and grant_type in 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 with clientId and clientSecret fields. 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