Make a personal access token
A personal access token lets your own script or tool read the shop as you. You make it in Settings › Integrations › API, copy it once, and send it with each request.
Make a token
Open the API card
Go to Settings › Integrations › API and press New token.
Name it and pick how long it lasts
Give the token a Name that says what it is for, such as “Nightly export”. Expires in is 30 days, 90 days or 1 year; 90 days is the default. Press Create.
Copy the token
The token starts with tt_pat_. Press Copy token and store it somewhere safe, such as a password manager. Telltail shows the token once and keeps no copy that can be shown again.
Use it
Send the token in the Authorization header of each request:
curl "https://app.telltailhq.com/api/v1/customers?limit=5" \
-H "Authorization: Bearer tt_pat_your_token"The answer is JSON. See Make requests to the API for lists, errors and limits.
What the token can see
- What you can see. The token has your role’s permissions in the shop you made it in. If your role changes, so does the token.
- Read only. A token can’t change anything in the shop.
- One shop. If you work at two shops, make a token in each.
Keep track of your tokens
Settings › Integrations › API lists your tokens and when each was last used. Admins, and anyone else who can manage staff, see every token in the shop.
To end a token, press the remove button on its row, then Revoke token. Anything using it loses access at once. You can revoke your own tokens; admins can revoke anyone’s.
When a token stops working
- It reaches the expiry you chose.
- It goes 90 days without being used, whatever its expiry.
- You revoke it, or an admin does.
- You leave the shop, or are suspended or archived on Staff.
- The shop switches Connected apps off in Settings › Features.
Q&A
I lost the token. Can I see it again?
No. Revoke it and make a new one, then update whatever was using it.
How many tokens can I have?
You can have twenty live tokens for each shop.
Can a token last forever?
No. One year is the longest. Make a new token before the old one expires and swap it in.
Why can’t I make a token on the shop’s register?
A token belongs to the person signed in. On a register signed in as someone else, sign in as yourself on your own device first.
I don’t see the API card in Settings › Integrations.
The API card appears when the shop has Connected apps switched on in Settings › Features.