# Authentication Tokens

You will need to retrieve an authentication token to create new businesses or to use the embedded accounting widget.&#x20;

## Retrieving an authentication token

The token is valid for one hour and can be used in multiple requests. To keep your API key secure only retrieve tokens through your backend and then pass the token to your frontend for use in the widget.&#x20;

{% openapi src="/files/i28ZJB6aUpE9wfIzCdVJ" path="/api/auth/token" method="post" %}
[stubapi.json](https://4021917470-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpZtVLrUwNfGfPLu2CDM%2Fuploads%2FeByKftwIoFnhQDFwm1Jq%2Fstubapi.json?alt=media\&token=403ccabe-676a-4f26-92d5-c6516301d7e2)
{% endopenapi %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.stub.africa/api-documentation/authentication-tokens.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
