# Public API - Refresh Token

The [<mark style="color:blue;">Squadcast Public API</mark>](https://apidocs.squadcast.com/) provides you with the ability to access certain Squadcast features within your account, allowing you to configure users, services, grouping incidents and more to help further reduce noise and speed up response times.

{% hint style="info" %}
**Note:**

We have recently changed the flow of generating a refresh token to access the Squadcast API.
{% endhint %}

In order to use the Squadcast API, you will need to first generate a Refresh token from the Squadcast Web App by following the steps below.

## From Your Profile Page <a href="#from-your-profile-page" id="from-your-profile-page"></a>

1. Move over to the <mark style="color:red;">`My Profile`</mark> page from the top right corner of your screen.
2. In the next window, click on the <mark style="color:red;">`Generate New Token`</mark> button from the <mark style="color:red;">`API Refresh Token`</mark> section.
3. A Refresh token will be generated and displayed. You can use this to generate the Refresh Token and use it to access our public APIs as given in the [<mark style="color:blue;">Squadcast API documentation</mark>](https://apidocs.squadcast.com/).

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-a777af7e9c4c8ad4aa245eed3fe900e7e3af47be%2Fsquadcast_api_3.png?alt=media&#x26;token=fa8b3d6e-e577-4a9d-9df4-76e88eb7acb8" alt="Generated API Refresh Token"><figcaption><p>Image. Generated API Refresh Token</p></figcaption></figure>

{% hint style="info" %}
You can also Revoke the Refresh token and the associated Access Tokens will also get revoked.
{% endhint %}

{% hint style="warning" %}
Please keep your Refresh Token as safe as your Password.
{% endhint %}

For more details regarding how to use the Squadcast Public APIs, please refer to the [<mark style="color:blue;">Squadcast API Documentation</mark>](https://apidocs.squadcast.com/).

## Account Owner Controls <a href="#account-owner-controls" id="account-owner-controls"></a>

As an Account Owner of a Squadcast organization, you can invoke or revoke refresh tokens for admins and users in your organization.

1. Move over to <mark style="color:red;">`Settings`</mark> from the left-side navigation panel.

{% hint style="info" %}
**Note:** The API Refresh token is role restricted, that is, an API Refresh token created for a <mark style="color:red;">`User`</mark> will only allow User specific controls.\
\
The API Refresh token was created for an <mark style="color:red;">`Admin`</mark> will only provide Admin-specific controls.
{% endhint %}

2\. Click on <mark style="color:red;">`API Tokens`</mark> to view the active API tokens and to create or revoke existing tokens.

Click on <mark style="color:red;">`Assign Token To User`</mark> to invoke an API Token for any User or Admin in your organization.

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-31c12cc10ed4f02c7de2345accf79da64070d7bb%2Fsquadcast_api_5.png?alt=media&#x26;token=89b8b162-f3d0-46ef-a02c-bcaea706ef68" alt="Invoke API Token for any user or admin in Squadcast"><figcaption><p>Image. Invoke an API Token for any user or admin</p></figcaption></figure>

3\. Pick the User or Admin from the dropdown menu for whom you want to assign an API Token. You can add more by simply clicking on the <mark style="color:red;">`Assign Token To User`</mark> and following the same process.

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-b8132ec67440efa133a62a8e1f0a5f92179b340a%2Fsquadcast_api_6.png?alt=media&#x26;token=dbd76946-4351-46c6-aa80-26fc7f4757ee" alt="Selecting the user to assign an API Token"><figcaption><p>Image. Selecting the user to assign an API Token</p></figcaption></figure>

The assigned token will also be visible to the Users/ Admins on their respective <mark style="color:red;">`My Profile`</mark> pages.

![Image. User API Token visible on the Profile page](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-fbe8ce2d26b6e2540b8f3f1f2da53abf1525aad6%2Fsquadcast_api_7.png?alt=media\&token=2105cc56-b10f-4cac-9ad9-d1ccdcab538d)

{% hint style="warning" %}
Please keep your Refresh Token as safe as your Password
{% endhint %}

Check out the list of available APIs in [<mark style="color:blue;">Squadcast API Documentation</mark>](https://apidocs.squadcast.com/)<mark style="color:blue;">.</mark>

*Have any questions?* [*Ask the community*](https://community.squadcast.com/view/home)*.*


---

# 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://support.squadcast.com/terraform-and-api-documentation/public-api-refresh-token.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.
