# Authentication

### **Introduction**

This document provides guidelines on how to authenticate your application with the Sendbox API. This updated version includes streamlined authentication processes and reflects recent changes to the API.

### Getting Started

To integrate with the Sendbox API, you'll need to create an application and obtain an access token, which will be used for all subsequent API requests. Here's how to get started:&#x20;

{% hint style="info" %}
It is important to note that all development and testing are done on staging. Once completed, remember to update the production URL and follow all the same steps.&#x20;

[https://developers.sendbox.co/](https://developers.staging.sendbox.co/)
{% endhint %}

<table data-header-hidden><thead><tr><th width="155"></th><th width="303"></th><th></th></tr></thead><tbody><tr><td><strong>Environment</strong></td><td><strong>Developer Dashboard URL</strong></td><td><strong>Base URL</strong></td></tr><tr><td><strong>Staging</strong></td><td><a href="https://developers.staging.sendbox.co/">https://developers.staging.sendbox.co/</a></td><td><br><a href="https://sandbox.staging.sendbox.co/">https://sandbox.staging.sendbox.co/</a></td></tr><tr><td><strong>Production</strong></td><td><a href="https://developers.sendbox.co/">https://developers.sendbox.co/</a></td><td><a href="https://live.sendbox.co/payments/">https://live.sendbox.co/</a> </td></tr></tbody></table>

### &#x20;**Create a New Application**

1. **Sign Up:** Visit [Sendbox for Developers](https://developers.staging.sendbox.co/) and sign up for an account if you haven’t already.
2. **Dashboard:** After signing in, navigate to your dashboard and create a new application. You will need to provide the following details:

   * **Name:** The name of your application.
   * **Description:** A brief description of what your application does.
   * **Webhook URL:** The URL where Sendbox will send event notifications for your application.

   After submitting this information, your application will be created successfully. Keep your application keys in a safe place as they will be required for making API requests.

### &#x20;**Authorization**

Once your application is created, you'll be issued an access token. This token is crucial for authorizing API requests.

* **Access Token:** The access token is used to authenticate your application. It should be included in the header of every API request.

### &#x20;**Making API Requests**

To interact with the Sendbox API, include your access token in the header of your HTTP requests as shown below:

```bash
GET /your/api/endpoint
Host: live.sendbox.co
Authorization: {your-access-token}
```

* **Authorization Header:**\
  The header must include the `Authorization` key, followed by  your access token.

### **Permanent Tokens**

Please note that access tokens are now permanent and do not expire. There is no need to handle token refresh mechanisms.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sendbox.co/authentication/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
