API tokens
Create, name, copy and revoke API tokens, the keys that let Zapier, Make, Pabbly Connect and your own software use your Leal store.
An API token is a long secret key that lets software use Leal on your behalf through the Leal API. Zapier, Make and Pabbly Connect all need one, and so does any software your developer writes. Treat a token like a password: anyone who has it can do what you can do in Leal, through the API.
You manage tokens on the API page in your settings menu. Creating a token needs a Pro plan.
Create a token#
- Open API in your settings menu.
- Click Create an API token.
- Give it a name that says where it will be used, such as "Zapier" or "Website sign-up form".
- Click Create.
- Click Copy next to Your API token and paste it into the other app.
You can come back to the token's page later to copy it again. The page also shows when the token was created and when it was last used, and a Quick start example for developers.
What a token can reach#
A token belongs to you, not to a store. It works for every store where you are on the Team members list, and the other software chooses which store to use (Zapier and Make do this with your Account ID). There are no separate permission levels: a token can do anything the API allows for your stores.
That has two consequences:
- If you're removed from a store, your tokens stop working for that store, and so does any automation using them.
- If you're on the team of several stores, one leaked token exposes all of them.
Rename or revoke a token#
- Rename: open the token, click Edit token, change the name and click Save.
- Revoke: open the token, click Revoke token and confirm. It stops working straight away, and anything using it stops too.
Keeping tokens safe#
- One token per tool. If you stop using a tool, or think its token has leaked, revoke that one token and nothing else breaks.
- Never put a token in a web page, an app or an email. It belongs on a server or in a tool's connection settings, nowhere a customer could see it.
- Use the last used date. A token that hasn't been used for months is probably for something you no longer use. Revoke it.
- Revoke tokens when people leave. If a developer or agency set up a token with their own login, ask them to revoke it, or remove them from the team.
- Think about whose login creates the token. Because tokens follow the person, an automation set up on a staff member's login stops working if they leave the team.
For developers#
Send the token in the Authorization header as Bearer <token>. The API reference, SDKs for nine languages and code examples are at getleal.com/developers.
Still stuck?
Our team answers every message. Contact support