Golang

Integrate your Golang app with us using our Golang package

Installation

Add github.com/tyrads-com/tyrads-go-sdk-iframe to your app as follows:

go get -u github.com/tyrads-com/tyrads-go-sdk-iframe

The latest available version of Golang github.com/tyrads-com/tyrads-go-sdk-iframe is v0.1.6.

Get Started

After successfully installing our package, create a TyrAdsSdk object with your API key and API secret:

tyrAdsSdk = tyrads.NewTyrAdsSdk(
	API_KEY,
	API_SECRET,
	"") // Leave it empty ("") to use default "en" (English)

Localization

This TyrAdsSdk class also supports localization, more info about localization

For example:

tyrAdsSdk = tyrads.NewTyrAdsSdk(
    API_KEY,
    API_SECRET,
    "en")

Authentication

You can do the authentication by calling to our package

After obtaining the token successfully, you can call iframeUrl method to get the iframe URL

  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

Deeplinking Routes

This iframeUrl method also supports deeplinking, more info about deeplinking routes

For example:

Embedding The Iframe

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

For example:

Example

For example implementation using our Golang SDK, you can find it here

Last updated