# Requesting temporary credentials

In accordance with AWS security recommendations, Rightsline utilizes expiring credentials to authenticate requests to our API.  These temporary credentials are valid for **1 hour.**  After these credentials expire, you will need to request a new set of temporary credentials.  These temporary credentials will be used to compute the Authentication signature for all other requests to the API.

{% hint style="info" %}
**With the April 30, 2025 Production release, requests to this endpoint will be limited to 300 requests per minute for a given IP address. All subsequent requests to this endpoint for that minute will receive a 429: Too Many Requests response.**
{% endhint %}

To obtain temporary credentials, send a request to the following endpoint:

## Request Temporary Credentials

<mark style="color:green;">`POST`</mark> `https://ris.rightsline.com/v4/auth/temporary-credentials`

#### Headers

| Name         | Type   | Description             |
| ------------ | ------ | ----------------------- |
| Content-Type | string | application/json        |
| x-api-key    | string | Your company's API key. |

#### Request Body

| Name      | Type   | Description                 |
| --------- | ------ | --------------------------- |
| accessKey | string | Your user's API access key. |
| secretKey | string | Your user's API secret key. |

{% tabs %}
{% tab title="200 Credentials accepted." %}

```javascript
{
    "accessKey": "***********",
    "secretKey": "***************************",
    "sessionToken": "FQoDYXd//////====ONCXz6OZC6FIxoWO1CGxVkwnY6WT07ZdLgGkr5ZkRCnGpa5uiF5KKbgMMWyQjKIazeyarBvXleDQmJznO4tBKq3U709cY20lVkdzHwAJQ5HXWHVop6w6cRy8uyOFPZ9fPD79PJ0L9KUkSo9uIG8DUK7PRvs4eAtIQQFdW+j2eHx6sUlF====34098qojfaof",
    "expiration": "2018-01-01T00:00:01+00:00"
}
```

{% endtab %}

{% tab title="401 Invalid credentials." %}

```
```

{% endtab %}
{% endtabs %}

### Example Request

```javascript
{
    "accessKey":"*****************",
    "secretKey":"***********************"
}
```

{% hint style="info" %}
See [Getting Started](/getting-started.md#obtaining-api-credentials) for instructions on obtaining your access and secret keys.&#x20;
{% endhint %}


---

# 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://api-docs.rightsline.com/authentication/requesting-temporary-credentials.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.
