Internal use only!
The ProteusAI Management API uses tokens to authenticate requests. Some of the tokens supported by ProteusAI are:
User Tokens
A user token represents the user who created it and may or may not be limited to the organization in which it was created. If the user token isn’t limited to an organization, you may be able to use it in other organizations to which the user belongs. A user token assumes the same role as the user in each organization.
Create User Token
User tokens are typically created on via the frontend app but they can also be created via the Management API.
POST /api/tokens
curl https://management-api.useproteus.ai/api/tokens \
-X POST \
-H "Authorization: Bearer user-3a4d80a9c3cca7ffd1bc341f.ede04d00e4b168bed35d9fcde8c2f92f.00d7fecf89201691f94b01e5b294da65.e7ea4c191b2c9a059ce5658deb7349c26a931ed8b7a04bf0" \
-d '{ "name": "My First Token" }'
The token string is in response.data.token
.
You can limit the token to the organization in which it is created by specifying the orgId
in the request body.
curl https://management-api.useproteus.ai/api/tokens \
-X POST \
-H "Authorization: Bearer user-3a4d80a9c3cca7ffd1bc341f.ede04d00e4b168bed35d9fcde8c2f92f.00d7fecf89201691f94b01e5b294da65.e7ea4c191b2c9a059ce5658deb7349c26a931ed8b7a04bf0" \
-d '{ "name": "My Org-Scoped Token", "orgId": "663bb046dcff89fd617b970c" }'
This token cannot be used outside of its parent organization. For instance, this token cannot be used to create a new organization.