Quickstart Guide¶
A token and your first authenticated call. Everything else in these guides builds on this.
Prerequisites¶
You need an account before any of this works
Every step below depends on having an identity in the Taiga Cloud identity provider. There is no self-registration — accounts cannot be created from these docs, from the API, or by signing up.
Access is granted by invitation. If you don't have an account yet, see Getting an account at the foot of this page. Until then the approval step in step 2 has nothing to approve against, and it will fail rather than prompting you to register.
Quick Overview¶
If you only want to see a response, skip the token entirely. /reference has a Sign in button that runs the whole flow in your browser and attaches the credential to any request you send from the page. Useful for exploring an endpoint before scripting it.
The rest of this guide covers the version your code will use.
Step-by-Step Process¶
1. Request a Device Code¶
No client registration, no redirect URI, no client secret:
curl -s -X POST https://api.taigacloud.tech/v2/oauth2/device/code \
-H "Content-Type: application/json" \
-d '{"device_name": "my-laptop"}'
{
"device_code": "…",
"user_code": "A1B2C3D4E5F6",
"verification_uri": "https://api.taigacloud.tech/oauth2/device/verify?user_code=A1B2C3D4E5F6",
"expires_in": 600,
"interval": 5
}
device_name is how this credential will be identified when you review or
withdraw it later, so name it after the machine or job that will hold it.
2. Approve the Device Code¶
Open the verification_uri in a browser and sign in. The link already carries
the user_code, so there's nothing to type.
You have 10 minutes (expires_in) before the device code lapses and you
start again.
3. Poll for the Token¶
curl -s -X POST https://api.taigacloud.tech/v2/oauth2/device/token \
-H "Content-Type: application/json" \
-d '{"grant_type": "device_code", "device_code": "…"}'
Poll no faster than interval seconds. 428 means the approval hasn't
happened yet — keep going. Once approved:
{
"access_token": { "token": "…", "token_type": "bearer", "expires_in": 3600 },
"refresh_token": { "token": "…", "token_type": "bearer", "expires_in": 604800 }
}
The token is nested
The value you put in the Authorization header is
access_token.token, not access_token. Each credential is an
object, which differs from the flat shape most OAuth libraries expect.
4. Make Your First Call¶
Start with /v2/projects. It returns the projects your role covers, and those
determine what every other endpoint will return — so it's both a proof that
the token works and the identifier you need for almost everything else.
# What can I actually do, and where?
curl -s -H "Authorization: Bearer $TOKEN" \
https://api.taigacloud.tech/v2/users/users/user | jq '.assigned_entities'
That second call is the one to remember. assigned_entities lists every
customer and project you hold a role in, and which role — which is the answer
to most "why did that fail" questions.
Troubleshooting Common Issues¶
| Error Code | Cause | Solution |
|---|---|---|
401 |
The token is missing, expired or malformed | Refresh it, or run the flow again |
403 |
You're authenticated, but your role doesn't permit the action | A new token won't help |
404 |
Either it doesn't exist, or it's outside your scope | On /v2/projects and /v2/customers it also means "none that you can see" — see Collections |
428 |
While polling in step 3, the approval has not happened yet | Keep polling |
429 |
Rate limited | The device endpoints allow 5 requests a minute. Wait for Retry-After |
The full list is in Conventions.
Next Steps¶
| Topic | Description |
|---|---|
| Provisioning a machine | The end-to-end walkthrough — catalogue to running machine |
| Authentication | Refreshing, session cookies, and managing what holds your tokens |
| Resource model | What the resources are and how they fit together |
| API conventions | Pagination, errors, ETags, rate limits |
| /reference | Every endpoint, generated from the running service |
Getting an Account¶
Access is granted by invitation, and someone who already administers the customer or project has to make it.
- Your organisation already uses Taiga Cloud — ask whoever administers
your customer or project to grant you a role. They can do it from the
portal, or with
POST /v2/users/{customerORprojectUUID}. - Your organisation is new to Taiga Cloud — talk to us first. Contact sales in the Help menu above.
- You had access and lost it — your role may have been removed. Support in the Help menu.