---
title: Get a token
project: Total API
version: 2026
section: guides
language: en
license: 
url: https://totaljs.es/docs/total-api/2026/guides/get-a-token/
updated: 2026-11-19T06:09:14.885Z
---

# Get a token

> Get the token that every request to Total API needs, and check its credits.

Every request to Total API needs your token. The token identifies you, and each request takes its price from the credits of the token.

## Get it

1. Open the [Total.js Platform](https://platform.totaljs.com?open=api) and sign in with your Total.js account.
2. Open the **API** section. It shows your token, your credits and the current price of each service.
3. Copy the token.

Keep the token secret, like a password: anyone who has it can spend its credits. Put it in the configuration of your application, never in code that a browser downloads.

## Check the credits

The [check](../../reference/account/#check) service returns the credits that remain. It is free.

```js
var response = await API('TAPI', 'check').promise();
console.log(response.credits);
```
