# Manual Integration

{% hint style="warning" %}

#### Initialize After Media Source or MMP Initialization

Please initialize our SDK only after the media source or MMP data is initialized. This ensures that the media source data is sent correctly and prevents passing empty values.
{% endhint %}

If your platform is not supported, you can integrate with us manually by making HTTP requests to our API using any HTTP client.

## Authentication

You can make a request to our API using any HTTP client by following the API documentation below

## POST /v3.0/auth

> Initialize SDK Session

```json
{"openapi":"3.0.4","info":{"title":"TyrAds SDK","version":"1.0.0"},"servers":[{"url":"https://api.tyrads.com"}],"paths":{"/v3.0/auth":{"post":{"tags":["default"],"summary":"Initialize SDK Session","parameters":[{"name":"lang","in":"query","schema":{"type":"string"}},{"name":"X-Api-Key","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Api-Secret","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-SDK-Platform","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-SDK-Version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"publisherUserId":{"type":"string","description":"Publisher User/Customer unique ID","nullable":false},"age":{"type":"number","description":"User age","nullable":true},"gender":{"type":"number","description":"User gender, 1=male, 2=female","nullable":true},"email":{"type":"string","description":"User email","nullable":true},"phoneNumber":{"type":"string","description":"User phone","nullable":true},"identifierType":{"type":"string","enum":["GAID","OAID","IDFA","OTHER"],"description":"Device Identifier/Advertising ID Type","nullable":true},"identifier":{"type":"string","description":"Device Identifier/Advertising ID","nullable":true},"sub1":{"type":"string","nullable":true},"sub2":{"type":"string","nullable":true},"sub3":{"type":"string","nullable":true},"sub4":{"type":"string","nullable":true},"sub5":{"type":"string","nullable":true},"userGroup":{"type":"string","nullable":true},"mediaSourceName":{"type":"string","nullable":true},"mediaSourceId":{"type":"string","nullable":true},"mediaSubSourceId":{"type":"string","nullable":true},"incentivized":{"type":"boolean","nullable":true},"mediaAdsetName":{"type":"string","nullable":true},"mediaAdsetId":{"type":"string","nullable":true},"mediaCreativeName":{"type":"string","nullable":true},"mediaCreativeId":{"type":"string","nullable":true},"mediaCampaignName":{"type":"string","nullable":true}},"required":["publisherUserId"]}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"token":{"type":"string"}}},"message":{"type":"string"}}}}}},"403":{"description":"Unsuccessful operation","content":{"application/json":{"schema":{"type":"object"}}}},"422":{"description":"Unsuccessful operation","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Unsuccessful operation","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}}}}
```

{% hint style="info" %}

1. A new token must be requested each time a user wants to access the offerwall.
2. Each token is valid for **7 days** only
   {% endhint %}

After obtaining the token successfully, you can pass the token to our iframe link and embed the iframe on your page.

```
https://sdk.tyrads.com?token=[TOKEN_HERE]
```

For example:

```
https://sdk.tyrads.com?token=eyJ2YWwiOiI3M3NIeUpNQlp4QzA1TlRHVzhxRExhWWNTeUQ5TTJIT0h3NXBvL3djVVp1Z09MR20wOTJJOTRReDBuYUFLeXhmVGRCaGYra2gvVGcydWFlbUh6aWR6S00vTmV0SEtVZVlWNk5Pdkc5Wnd5bytkSkxmUnA0aWt2eE9yQ01YTXF6LzBnRmZ3RUpucHMxem95WnRkYkVlQXJQNER3cDRZVkttb1lBdEIrZlB6cFZ3R25SSEE5UjROa2U2cGJTeTJod2c2UmI3UnN0QzZiN2Y2cENBYTlqaEhvQXhtdjM5UERPU2tDdWpHMmJIQ2N1cVRldVQ4a3hDSEE9PSIsInZlYyI6InNWbzZrejZRa09iS0tDeDUiLCJ0YWciOiJ1eDNnbjEwNEdUWXpvV1J2TTZVck1BPT0ifQ==
```

### Embedding The Iframe

If your website is using html, you can add an iframe to your page to integrate TyrAds web:

```html
<iframe id="tyrads_iframe" src="[IFRAME_LINK]" height="650" width="300"></iframe>
```

For example:

```html
<iframe id="tyrads_iframe" src="https://sdk.tyrads.com?token=eyJ2YWwiOiI3M3NIeUpNQlp4QzA1TlRHVzhxRExhWWNTeUQ5TTJIT0h3NXBvL3djVVp1Z09MR20wOTJJOTRReDBuYUFLeXhmVGRCaGYra2gvVGcydWFlbUh6aWR6S00vTmV0SEtVZVlWNk5Pdkc5Wnd5bytkSkxmUnA0aWt2eE9yQ01YTXF6LzBnRmZ3RUpucHMxem95WnRkYkVlQXJQNER3cDRZVkttb1lBdEIrZlB6cFZ3R25SSEE5UjROa2U2cGJTeTJod2c2UmI3UnN0QzZiN2Y2cENBYTlqaEhvQXhtdjM5UERPU2tDdWpHMmJIQ2N1cVRldVQ4a3hDSEE9PSIsInZlYyI6InNWbzZrejZRa09iS0tDeDUiLCJ0YWciOiJ1eDNnbjEwNEdUWXpvV1J2TTZVck1BPT0ifQ==" height="650" width="300"></iframe>
```

## Deeplinking Routes

The Tyrads SDK supports deeplinking to specific sections of the offerwall. When initializing or interacting with the SDK, you can specify a route to open a particular page. For campaign-specific routes, you'll need to provide the campaignID as well. Click [here](broken://pages/MKFNwkbxpNryiN9b0Cnj)

## Localization

### Overview

In addition to using URL parameters, the web application itself can change the localization settings. This allows users to switch languages directly within the application. Click [here](broken://pages/X0gL2BEg4Nc9tWOV2urd)


---

# 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://sdk-doc.tyrads.com/iframe/installation/manual-integration.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.
