# Authentication and quickstart

Use an iStores API bearer token to connect your server to your store.

## 1. Get your credentials

Open [API settings in your dashboard](https://app.istores.co.il/client/settings/company) and obtain your integration credentials. Enable the permissions needed for the operations you plan to use. Keep your token private.

## 2. Set your headers

| Header | Value |
|---|---|
| `Authorization` | `Bearer YOUR_TOKEN` |
| `User-Agent` | Your integration name and version, such as `catalog-sync/1.0` |
| `Content-Type` | `application/json` when sending a JSON body |

## 3. Read your catalog

This request reads the first ten products without changing your store:

```bash
curl "https://api.istores.co.il/products/10/1" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "User-Agent: catalog-sync/1.0"
```

Replace `YOUR_TOKEN` with your bearer token. See [Products](https://apidocs.istores.co.il/api/products) for the response fields and pagination parameters.

## 4. Choose your next operation

Browse [API resources](https://apidocs.istores.co.il/explore), open a resource and choose an operation. Check its required permissions and fields before sending a request. In the API playground, use your own credentials and review the method and body before running it: write operations affect your live store.

## Troubleshooting

Authentication and permission errors

| Status | Action |
|---|---|
| `401` | Check the bearer token and obtain valid credentials if needed. |
| `402` | Review outstanding payments in your dashboard. |
| `403` | Check that your credentials allow the requested operation. |

Validation, rate limits and retries

| Status | Action |
|---|---|
| `400` | Check JSON syntax and the endpoint's request format. |
| `404` | Check the resource ID and whether the feature is available for your store. |
| `422` | Read the returned field errors and correct the request. |
| `429` | Wait before retrying. Honor `Retry-After` when present; otherwise use backoff. |

Keep requests at 2 per second. After a write times out, read the resource before retrying so you do not create duplicate records or repeat a payment.

Continue with [Requests, responses and retries](https://apidocs.istores.co.il/api-conventions). For AI assistants, follow the separate [MCP connection guide](https://apidocs.istores.co.il/mcp).
