> For the complete documentation index, see [llms.txt](https://docs.getblock.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getblock.io/getting-started/authentication-with-access-tokens.md).

# Access token management

GetBlock uses a secure authentication method based on access tokens to ensure that only authorized users can interact with blockchain nodes.

Every [endpoint](/getting-started/endpoint-setup.md) you create is assigned a unique access token:

```markup
https://shared.<region>.getblock.io/<ACCESS_TOKEN>/
```

The \<ACCESS\_TOKEN> authenticates requests directly through the endpoint URL.

### Making an authenticated request

To make a request, include your full endpoint URL with the access token in the path.

{% hint style="warning" %}
Access tokens **cannot** **be** **sent** in **headers**.
{% endhint %}

For example, here’s how to fetch the latest Ethereum block number:

{% tabs %}
{% tab title="Frankfurt endpoints" %}
{% code overflow="wrap" %}

```bash
curl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_blockNumber",
    "params": [],
    "id": "getblock.io"
}'
```

{% endcode %}
{% endtab %}

{% tab title="New York endpoints" %}
{% code overflow="wrap" %}

```bash
curl --location --request POST 'https://shared.us-east-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_blockNumber",
    "params": [],
    "id": "getblock.io"
}'
```

{% endcode %}
{% endtab %}

{% tab title="Singapore Endpoint" %}
{% code overflow="wrap" %}

```bash
curl --location --request POST 'https://shared.ap-southeast-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_blockNumber",
    "params": [],
    "id": "getblock.io"
}'
```

{% endcode %}
{% endtab %}
{% endtabs %}

Response:

```json
{
    "jsonrpc":"2.0",
    "id":"getblock.io",
    "result":"0x1449641"
}
```

### Access Token security

Always store your access tokens securely. Avoid exposing them in publicly accessible code repositories or logs.

If a token is compromised, you can quickly roll or delete it without disrupting other endpoints:

1. Go to your GetBlock **Dashboard**.
2. Locate the **endpoint** associated with the token.
3. Click the three-dot icon (![](https://3589185681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFOeg95CadVyFvyLi70Bh%2Fuploads%2Fgit-blob-573442d9832ef875bde99d9970911e829c4804ac%2Fdots-horizontal.svg?alt=media)) next to the endpoint.
4. Select the option to either **roll** (regenerate) or **delete** the token.

<figure><img src="https://3589185681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFOeg95CadVyFvyLi70Bh%2Fuploads%2Fgit-blob-e346a6a5eea0901f6d742382eaf4332e2558bcdf%2FDocs_AccessToken_roll.svg?alt=media" alt="How to manage GetBlock access tokens"><figcaption><p>Regenerate or delete your access token</p></figcaption></figure>

This authentication method ensures that all your interactions with GetBlock’s services remain secure, reliable, and easy to manage.
