Issuer's token in, ours out. `?tenant=` picks which membership it acts for.
POST
/console/token
const url = 'https://api.canopyhq.dev/console/token';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.canopyhq.dev/console/token \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”tenant
string
Which membership the token acts for; the first, absent.
Responses
Section titled “Responses”A console token for the tenant named.
Media typeapplication/json
object
expires
required
integer format: int64
name
required
string
role
required
What a user may do in a tenant. An owner consents on its behalf.
string
tenant
required
The organization that consented. Comes from the console’s identity.
string
token
required
string
Example
{ "role": "Owner"}The query string did not parse.
No issuer token, or one this deployment does not trust.
No membership of the user answers this login.