> For the complete documentation index, see [llms.txt](https://docs.giga.store/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.giga.store/api/api-authentification.md).

# API Authentification

To authenticate with Gigastore backend, please use the credentials provided when logging in to your Gigastore account.&#x20;

{% hint style="info" %}
API credentials and inventory are bound to the Gigastore login. \
Make sure to use the same login to create credentials and manage your inventory.
{% endhint %}

The credentials are **Client ID** and **Client Secret**, which can be found in the[ API section ](https://dent.giga.store/#/api)of the Gigastore portal.&#x20;

<figure><img src="/files/k3MxvoSJwNmM66slj0a3" alt="" width="563"><figcaption></figcaption></figure>

&#x20;Use the `/reseller/authenticate` endpoint with [Basic Authorization](https://en.wikipedia.org/wiki/Basic_access_authentication) using your **Client ID** as username and **Client Secret** as password to retrieve the accessToken.&#x20;

The snippet below can be generated by following the **"First Steps"** in the Gigastore API portal, or the base64 value needs to be calculated on your side.

```
curl --location --request POST 'https://api.giga.store/reseller/authenticate'
--header 'Authorization: Basic base64(<clientid>:<clientsecret>)'

Response:
{
    "accessToken": "eyJhbGciOiJSUzI1NiIsInR5c..._very.long_string",
    "expiresIn": 86400,
    "refreshToken": null,
    "refreshExpiresIn": 0,
    "tokenType": "Bearer",
    "idToken": null
}
```

Now, you can use the **accessToken** in your header as **Authorization Bearer** for other API calls needing authentification.

```
curl --location --request GET 'https://api.giga.store/gigastore/products/inventory' \
--header 'Authorization: Bearer eyJhbGciO...YOUR_ACCESS_TOKEN...

Response:
{
    // your inventory
}
```
