Authenticate
In order to use the Mythical API, you must retrieve an authentication token.
// Retrieve your server authentication token
const response = await fetch('/v1/auth/token', {
method: 'POST',
headers: {
"x-mythical-environment-id": "...",
"clientId": "...",
"clientSecret": "...",
},
});
// Pass this in the header in subsequent requests
const { bearerToken } = await response.json();
The token must be passed with each request made to the server.
Last updated