# Polls API

{% hint style="warning" %}
In Q1 2025, the Chiliz team will decommission several endpoints and features. This is to ensure that the Socios.com API remains focused on the Socios.com app features, and to bring it always closer to the Web3 ecosystem.&#x20;

Don't worry! We will provide you with alternatives right here on this documentation site.

You will find more information [in this guide](https://connect.socios.com/partner-api/2025-api-update-overview), and in each API section of this site.
{% endhint %}

{% hint style="danger" %}
**Polls API endpoints that are decommissioned with alternatives**

The following endpoint will soon not be available anymore, and we encourage you to use one of the alternative we suggest here:

* `GET /polls:` Get a list of polls using search filters.
* `GET /user/poll/{pollId}/vote`: Vote on a poll.

\
**Polls API endpoints that are decommissioned with no alternative**

The following endpoints cannot be easily replaced by an alternative:

* `POST /user/polls`: Get user polls with search filters.
* `POST /user/poll/{pollId}`: Get user response on a poll.
* `POST /user/poll/{pollId}/vote`: Get user response on a poll.
* `POST``/user/polls/history`: Get user polls history.

Sadly, if you do rely on one of these, you will have to remove the feature from your service.
{% endhint %}

## Socios.com Polls API&#x20;

The Polls API aims to provide a list of polls including individual details such as their questions, possible answers, starting dates, and end dates. You can enable your users to vote directly on your website if they hold fan tokens of the team related to that poll.

## Using the Poll API&#x20;

{% hint style="info" %}
If you're a new user and do not have access to the Socios.com portal yet, see [prerequisites](https://connect.socios.com/partner-api/prerequisites "mention").
{% endhint %}

1. Once you've logged in to the Socios.com API portal, select **Polls**.

<figure><img src="https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2FBFAukKaSjg0v9WmA1gb9%2Fimage.png?alt=media&#x26;token=aa681351-1215-498c-811c-37f7d27ae089" alt=""><figcaption></figcaption></figure>

2. Click the **Try Out** button next to the API URL.

<figure><img src="https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2FFNmJOHdDtnK9QwhxaMhr%2Fimage.png?alt=media&#x26;token=64e02242-8a82-490d-9381-6f57096b8c26" alt=""><figcaption></figcaption></figure>

3. You'll see the following modal, indicating registering steps completed. \
   Click the **Try Out** button.

![](https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2FjvBbUlSLm0zR0jtU0Uzl%2Fimage.png?alt=media\&token=43529eb3-a485-4c3b-b775-cbabdaabad4e)

4. On the **Security** page that is now displayed, *OAuth* is already selected. Click on the **Get Test Key** button.&#x20;

<figure><img src="https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2FFWnqDxytOGE3W42N2lND%2Fimage.png?alt=media&#x26;token=dda6ec32-8a5f-4044-8665-1f71ecb152ad" alt=""><figcaption></figcaption></figure>

5. Once the test key is generated, you can display it using the <img src="https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2FbOs5V6HzE1FDsxyfYUCh%2Fimage.png?alt=media&#x26;token=a58c5a36-10b0-499b-ad64-11eda7c15914" alt="" data-size="line"> icon.&#x20;

<figure><img src="https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2FihsHEEKN8mq1lOnooZgk%2Fimage.png?alt=media&#x26;token=66e2221f-ea71-46e8-bf18-9b6189c9acfc" alt=""><figcaption></figcaption></figure>

## Subscription

1. On the **Subscriptions** page then click on the **SUBSCRIPTION & KEY GENERATION WIZARD** button.

<figure><img src="https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2FfFLU1LXhgegzePCgblrz%2Fimage.png?alt=media&#x26;token=7e5b90bb-2829-407b-bbef-1d62692c432c" alt=""><figcaption></figcaption></figure>

2. Then, enter valid details in the **Create application** form fields:

<figure><img src="https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2F62uHJ9lkDume9RuOKIGj%2Fimage.png?alt=media&#x26;token=7eaa3b40-f9a0-4551-9828-820609bbb7aa" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="333">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>Application Name</td><td>A valid name of the Application</td></tr><tr><td>Shared Quota for Application Tokens</td><td>The amount of tokens generated for each application</td></tr><tr><td>Application Description</td><td>(Optional). A brief description about the application</td></tr></tbody></table>

3. In the *Subscribe to new application* step, enter the **Application** name you want to use. \
   Select a *Business Plan* from the dropdown menu, and click **Next.**

<figure><img src="https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2FWEu1dn6NLGJwgGbMVd5b%2Fimage.png?alt=media&#x26;token=ad61d022-fcc3-4f6f-81af-8076b9db00c3" alt=""><figcaption></figcaption></figure>

4. On the *Generate Keys* tab, once you've carefully reviewed the page, select **NEXT**.

<figure><img src="https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2F1OtUzDOLMyeWtUVRMBQq%2Fimage.png?alt=media&#x26;token=52e3c3e9-c34b-4304-9cf1-37bd2e1aa2ed" alt=""><figcaption></figcaption></figure>

5. On the *Generate Access Token* tab, enter a valid description in the **Scopes** field. Select **NEXT**.

<figure><img src="https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2F9nVImpsssnAScx9buF7W%2Fimage.png?alt=media&#x26;token=72244954-b8af-46bf-bd96-20fbbe2c9181" alt=""><figcaption></figcaption></figure>

6. On the *Copy Access Token* tab, select ![](https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2FkQq2AwEL1rl07fIDExOF%2Fimage.png?alt=media\&token=773d6678-8f8a-4877-9c4b-90f6c426ffb5) to copy the Access Token. Once copied, click **FINISH**.&#x20;

   <figure><img src="https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2FdzAirkFUbJQiwgQmVSt8%2Fimage.png?alt=media&#x26;token=3c3ad712-eebd-42e6-8fc7-e6a72eb9dab2" alt=""><figcaption></figcaption></figure>

7. You can view your newly created Polls subscription under the **Subscriptions** section.

<figure><img src="https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2F2KbNf1hPH5UkQp5lavjT%2FScreenshot%202023-03-08%20at%206.06.25%20PM.png?alt=media&#x26;token=b5ca5a7f-64ed-4fce-87b4-b7a0d01f0cbc" alt=""><figcaption></figcaption></figure>
