> ## Documentation Index
> Fetch the complete documentation index at: https://docs.invopop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication guide

> After completing this quick start guide you'll have generated and tested an authentication token that can be used in all subsequent requests to the Invopop API.

## Requirements

You don't need to be a developer to use this guide, but you will need to have a
bit of experience using the command line and know how to create a text file.
For sending requests to the server we use the "curl" command, and for easy
visualization of the response, the "jq" command — both included with most
operating systems. Install "curl" and "jq" in case they are not installed
in your system.

## Create an account

Head over to the [Invopop Console](https://console.invopop.com) and follow
the steps to either log in or create an account.

## Get a token

1. Once inside the console, open **Configuration → API keys** and click
   <kbd>Manage API keys</kbd>. This takes you to the **API keys** section of
   [Admin](https://access.invopop.com), where keys are created.

2. Click <kbd>New API key</kbd>.

3. Choose the workspace the key will act on. Pick your sandbox workspace while
   you're testing.

4. Provide a name for future reference, and optionally a description of the use
   case.

5. Tick the permissions the key needs. For this guide, **Read** on **All
   services** is enough; for a real integration, grant only the services it
   uses. See [API keys](https://docs.invopop.com/console/api-keys.md) for what each permission covers.

6. Click <kbd>Create API key</kbd>. You'll be presented with the new token and a
   button to copy it. The token is shown only once, so paste it somewhere safe.

> [!TIP]
>
> Invopop uses JSON Web Tokens. If you're interested in seeing the contents,
> head over to [JWT.io](https://jwt.io) and paste your token to see what's
> inside.

## Test

To test our new token, open the Terminal and prepare our environment using the
following command, replacing `<TOKEN>` with the actual token generated from the
Invopop console in the last step:

```bash theme={"system"}
export INVOPOP_TOKEN="<TOKEN>"
```

This saves us from copying and pasting the token every time we need to use it,
and we can now make a call to the Invopop Ping service:

```bash theme={"system"}
curl -H "Authorization: Bearer $INVOPOP_TOKEN" https://api.invopop.com/utils/v1/ping | jq .
```

Response:

```json theme={"system"}
{
  "ping": "pong"
}
```

This ping call doesn't do anything useful, other than ensuring that your
connection and credentials are valid.

> [!NOTE]
>
> Most examples throughout this documentation will assume you have set the
> `$INVOPOP_TOKEN` variable.

Have your agent wire the token into this project and verify it.

Read [https://docs.invopop.com/guides/authentication.md](https://docs.invopop.com/guides/authentication.md). Add Invopop API access to this project: read the token from the INVOPOP\_TOKEN environment variable or this project's secrets mechanism, never from source code, and send it as an Authorization Bearer header to [https://api.invopop.com](https://api.invopop.com). Implement a small client with a ping method that calls GET /utils/v1/ping and returns true on pong, plus a helper that fetches a UUID from GET /utils/v1/uuid?v=7 for idempotent PUT requests. Keep one client instance per workspace, because each Invopop workspace has its own token. Add a test that calls ping when the variable is set and is skipped otherwise.

## Conclusion

You've now managed to authenticate with the Invopop API using a generated token.

> [card] [Participate in our community](https://community.invopop.com)
>
> Ask and answer questions about authentication →


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.