> For the complete documentation index, see [llms.txt](https://dansteren.gitbook.io/cordova-plugin-gotenna/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dansteren.gitbook.io/cordova-plugin-gotenna/api/setapplicationtoken.md).

# setApplicationToken

Sets the SDK application token for use in the goTenna SDK.

{% hint style="info" %}
NOTE: This method must be called with a valid token before any other SDK methods are called.
{% endhint %}

## Arguments

`token: string` Your unique gotenna application token.

{% hint style="info" %}
If you need an application token head on over to [gotenna's website](https://www.gotenna.com/pages/sdk).
{% endhint %}

## Returns

`undefined`

{% hint style="info" %}
If the token is invalid the SDK will not throw an error. It will however print`goTenna: Invalid goTenna App Token` as an error to the console.
{% endhint %}

## Example

```javascript
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
  // Plugins are now available.
  goTenna.setApplicationToken('your-token-here');
}
```
