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

# getAccessToken

```ts theme={null}
function getAccessToken(options: {
  forceRefresh: boolean;
}): Promise<null | string>;
```

Gets the access token for the current user.

## Parameters

| Parameter              | Type                            | Description                              |
| ---------------------- | ------------------------------- | ---------------------------------------- |
| `options`              | \{ `forceRefresh`: `boolean`; } | The options for getting the token.       |
| `options.forceRefresh` | `boolean`                       | Whether to force a refresh of the token. |

## Returns

`Promise`\<`null` | `string`>

The access token for the current user, or null if no user is signed in.

## Example

```typescript lines theme={null}
const accessToken = await getAccessToken();
```
