Me
how to generate SSO user tokens
Enki
# Generating SSO User Tokens
To generate an internal token for making calls to internal APIs, follow these steps:
## Generating an Internal Token
1. Navigate to **SSO Admin**
2. On the bottom left side, click your name and select **"Profile"**
3. Click **"Generate New Token"**
4. A new personal token will be generated. Clicking on it will copy it to your clipboard, and you can use it in any internal API that requires it.
### Important Notes
- The newly generated token remains visible until the page is reloaded. If you lose the personal token, you can regenerate it anytime, but keep in mind that the old token becomes inactive after regeneration or after clicking the **[Terminate all sessions]** button.
- The Staging token is only valid for Staging environments. To generate a **Production token**, navigate to [SSO Production](https://sso.tripledotapi.com/admin).
## Using Your Personal Token
Your personal token can be used to authenticate in any edge system managed through SSO that supports SSO personal tokens. You can still use the Game Server token for systems such as Level Editor.
### Example: Internal Localisation API
**Endpoint:** `/api/internal/localisations`
**Example request:**
```bash
curl -X 'GET' \
'https://localisations-server-staging.tripledotapi.com/api/internal/localisations?app_id=app_id_of_your_game' \
-H 'accept: text/csv' \
-H 'X-Authorization: your_personal_token'
```
**Response:**
```
Key,Type,Desc,en,es
test_key,text,some description,hello,hola
```
### Error Responses
If no valid token is provided, the API returns a **401** error:
```json
{
"message": "Invalid access token",
"code": 1000
}
```
If no token is provided at all, the API returns a **400** error:
```json
{
"message": "No token provided",
"code": 1020
}
```