New Project API key format and Personal Access Tokens 🔑
The old way how we were working with the API keys had several problems in security and usability manners. So we had to do some huge changes. However, you can stay calm. The legacy API keys are still supported, and you can use them until you delete them.
What has changed?​
- The API keys have a different format now. They are prefixed with
tgpak_
prefix. - You can still use the legacy API keys without
tgpak_
prefix anyway. - The API keys are not revealed in the platform, and you can only see them once when you generate them.
- We added Personal Access Tokens (PATs). With PATs you can access all the platform you are permitted to as a user. You can generate PATs in the user settings.
- Both API keys and PATs have expiration dates now, and you can store a description to note, why you've created such a secret.
To learn more about, visit Project API keys and Pats documentation section.
Why we did do it?​
Project API keys can authorize operations only in one project​
The first issue with API keys was that a single API key can work only with resources in one project. Recently we started to work on CLI, which will enable users to import, export, and analyze localization data in their projects and code. The problem was, that we had no way how to authenticate in the REST API to manage multiple projects with a single token. So we would have to store the user's credentials somewhere in their computer to authenticate the user for every request. This wasn't optimal, so we decided to add Personal Access Tokens, which can access all the resources the user has access to.