Skip to content

API tokens

By adding an API token to your application, you can skip the normal user login workflow and have continuous access to the ONEKEY API, both the REST and GraphQL parts.

To create and use an API token:

  1. Click on your profile in the top-right corner:
    Select profile
  2. Select API tokens.
  3. Click the Create new API token button.
  4. Fill in the details and follow the on-screen instructions.

    Important

    At the end of the process, make sure you save or copy the API token before closing the popup, as it will no longer be accessible afterwards, not even to our support team. If the API token is lost, a new one must be generated.

  5. Insert the API token into the Authorization header in your request as Bearer <api token>.

If you delete an API token on the platform, or it is expired, any API requests using that token for authorization will be denied with a 401 Unauthorized response. Create a new token on the platform and replace the old one to keep your application working.

For security reasons, you cannot edit an API token directly. If you want to change the name, permissions, etc. of the token or simply deactivate it immediately, you must delete the token and create a new one with the desired configuration.