# API Documentation

Everything you need to interact with AccessGrid.

## Supported Languages

- Terminal
- JavaScript
- Ruby
- GO
- Python
- C#
- Java
- PHP
- Elixir

## Install SDK

```bash
# install curl
```

```bash
npm install accessgrid
```

```bash
bundle add accessgrid
```

```bash
pip install accessgrid
```

```bash
go get accessgrid
```

```bash
Install-Package accessgrid.dll -Version 1.0.0
```

```bash
implementation "com.accessgrid.sdk:accessgrid:1.0.0"
```

```bash
composer require accessgrid/accessgrid
```

```elixir
{:accessgrid, ">= 0.0.0"} # mix
```

## Authentication

We use a dual authentication mechanism, it consists of two parts:

1. A static account id to be sent in the X-ACCT-ID header
2. A shared secret scheme to authenticate every API request with a signed payload in the X-PAYLOAD-SIG header

You can find both keys in your AccessGrid console on the API keys page. If you're logged in, they're automatically embedded into this documentation.

Otherwise, the code samples below reference your account id as `$ACCOUNT_ID` and your shared secret as `$SECRET_KEY`. Substitute them inline, or export them in your shell before running a snippet:

```bash
export ACCOUNT_ID="<your account id>"
export SECRET_KEY="<your shared secret>"
```

## Rate Limits

API requests that provision Android passes (Google Wallet) are subject to rate limits based on Google's Wallet API guidelines. When issuing or updating Android passes, please observe the following limits:

- Maximum of **5 concurrent connections** per account
- Maximum of **20 requests per second** per account

These limits apply to operations that trigger Google Wallet API calls, including issuing new Android passes and updating existing ones. Requests exceeding these limits may be throttled or rejected.
