⚙️Integrity

The cost for each request in this task is 0.002 cents.

Parameters

Parameter
Type
Required

access_token

String

Yes

device_id

String

No

client_id

String

No

Creating a Task

Send a POST request to create a new Twitch Integrity solving task using the createTask method.

Request

POST https://salamoonder.com/api/createTask
Host: salamoonder.com
Content-Type: application/json

{
  "api_key": "YOUR_API_KEY",
  "task": {
    "type": "Twitch_PublicIntegrity",
    "access_token": "your_twitch_account_oauth",
    "device_id": "optional_device_id",
    "client_id": "optional_client_id"
  }
}

Response

{
  "error_code": 0,
  "error_description": "",
  "taskId": "d4611a5f-9b4e-4f4a-94a2-8303d97562e1"
}

Response Fields:

  • taskId - Unique identifier for this task. Use this to retrieve results.

Getting Results

Retrieve the solution using the getTaskResult method.

Request

POST https://salamoonder.com/api/getTaskResult
Host: salamoonder.com
Content-Type: application/json

{
  "api_key": "YOUR_API_KEY",
  "taskId": "d4611a5f-9b4e-4f4a-94a2-8303d97562e1"
}

Response

{
  "errorId": 0,
  "solution": {
    "device-id": "ba478854e9d42411....",
    "integrity-token": "v4.local.IvusFCEJ6-Srca31_dOMU6WnJRLFy7P-rH_40ctQ.....",
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36...",
    "client-id": "kimne78kx3ncx6brgo4mv6wki5h1ko"
  },
  "status": "ready"
}

Response Fields:

  • device-id - Device identifier used for this task

  • integrity-token - Ready-to-use Twitch integrity token for authentication

  • user-agent - User-agent that was used to generate the token

  • client-id - Client ID used for this request

Quick Start Example

Here's a proof-of-concept Python example to get you started:

import requests
import json
import time

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://salamoonder.com/api"

# Step 1: Create task
task_data = {
    "api_key": API_KEY,
    "task": {
        "type": "Twitch_PublicIntegrity",
        "access_token": "your_twitch_account_oauth",
        #"device_id": "your_device_id",
        #"client_id": "your_client_id"
    }
}

response = requests.post(f"{BASE_URL}/createTask", json=task_data)
task_id = response.json()["taskId"]
print(f"Task created: {task_id}")

# Step 2: Poll for results
while True:
    result_data = {
        "api_key": API_KEY,
        "taskId": task_id
    }
    
    response = requests.post(f"{BASE_URL}/getTaskResult", json=result_data)
    result = response.json()
    
    if result["status"] == "ready":
        token = result["solution"]["integrity-token"]
        user_agent = result["solution"]["user-agent"]
        print(f"Integrity Token: {token}")
        print(f"User-Agent: {user_agent}")
        break
    
    time.sleep(2)

This example can be adapted to any programming language.

Last updated

Was this helpful?