> For the complete documentation index, see [llms.txt](https://developer.perculus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.perculus.com/v2-en/quick-start/authorization.md).

# Authorization

{% hint style="info" %}
The constructed Authorization token has to be added to every requests' header like so: `-H 'Authorization: Bearer <AUTH_TOKEN>'` .&#x20;

If you are using any of the [SDKs](/v2-en/quick-start/authorization/authorization-with-python.md), construction of the AUTH\_TOKEN will be handled by it. You just need to supply the ACCESS\_KEY and SECRET\_KEY.
{% endhint %}

To construct your token, you should have your ACCESS\_KEY and SECRET\_KEY ready. The format accepted by Groups is like the following:

`Bearer ACCESS_KEY|SHA256(ACCESS_KEY|SECRET_KEY)`&#x20;

An example of the construction of the token is below:

```javascript
// Get the access and secret from environment variables
const access = pm.variables.get("x2-access-key");
const secret = pm.variables.get("x2-secret-key");

// Combine them into a single string with '|'
const str = access + '|' + secret;

// Compute the SHA256 hash of the combined string
const hash = CryptoJS.SHA256(str).toString(CryptoJS.enc.Hex);

// Set the Authorization header with 'Bearer {hash}'
request.headers.set({ key: 'Authorization', value: 'Bearer ' + access + '|' + hash });
```

{% hint style="info" %}
All of these data can be collected from your environment variables as well. Just suffix each variable with `GROUPS_` , and SDKs will try to collect those information.
{% endhint %}
