> For the complete documentation index, see [llms.txt](https://docs.altura.com/altura-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.altura.com/altura-documentation/js-sdk-reference/altura-guard-ii/connect-to-a-users-wallet.md).

# Connect to a user's wallet

Use this method to authenticate users with Altura Guard II.&#x20;

### Usage in your script

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const AlturaGuard = await altura.alturaGuard(GUARD_CODE);
```

{% endtab %}

{% tab title="TypeScript" %}

```typescript
const AlturaGuard: AlturaGuard = await altura.alturaGuard(GUARD_CODE);
```

{% endtab %}
{% endtabs %}

### **Parameters**

<table><thead><tr><th width="193.33333333333331">Parameter</th><th width="88">Type</th><th width="109">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>GUARD_CODE</code></td><td><strong>String</strong></td><td><strong>Yes</strong></td><td>User entered Altura Guard code</td></tr></tbody></table>

{% hint style="info" %}
You should store both the address and token in a database. The user can revoke this token at any point and so can the game. If you lose this token, you will not be able to create a new connection with the user unless they revoke the existing one.
{% endhint %}
