> For the complete documentation index, see [llms.txt](https://developers.stub.africa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.stub.africa/api-documentation/authentication-tokens.md).

# 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 %}
