API Based Opt-in





Overview

The Unibo Bridge streamlines the campaign opt-in process for your gaming platform, simplifying the way players engage with and join promotions. It handles the technicalities, freeing up your team to focus on the gaming experience. The diagrams ahead will detail how this process works, showcasing the ease it introduces to both your team and your players.


Flow Overview

The overview diagram presents a high-level map of the opt-in process, illustrating how players can easily join campaigns through your platform, enhancing their experience with minimal clicks.


Detailed Flow

The detailed diagram dives into the specific interactions between your platform, the Unibo Bridge, and the campaign services, outlining the seamless steps a player takes from login to campaign engagement.


Campaign Configuration

You need to choose Opt-in via API option during campaign creation. The current supported opt-in options are:
  • No opt-in
  • Opt-in via Overlay
  • Opt-in via API

For any campaign with Opt-in via API selected in the campaign creation, the campaign will be hidden for the players until they have opted in through the API. Only after a player has been successfully opted through the API, the Unibo overlay will become visible for this player next to the game.


API Details

Authentication API

To utilize the Authentication API, first obtain the necessary credentials specific to your brand, and then you can proceed to authenticate and retrieve an access token.

Acquiring Credentials
Contact a Unibo representative to receive your unique brand credentials. These credentials are essential for accessing the Authentication API. See the steps below:
  • Construct a POST request targeting the endpoint: /api/v1/auth/token.
  • Include your acquired credentials in this request.
  • Upon successful request, the API will respond with a new access token.
  • Example of a successful response
{
"access_token": "corresponding access token",
"token_type": "bearer"
}

Utilizing the Access Token
  • For all subsequent API requests, it is necessary to include the received access token. This is done by appending the token in the header of your requests as a bearer token.
  • Example of bearer token usage
Authorization: Bearer <access token>



Opt-In API

Using the new endpoint /api/v1/campaigns/opt_in_player, a customer's system can use it to opt-in a player to campaigns. It requires a JSON payload with a request_id, campaign_id, and player_id. Successful calls will return the request_id and a result status, facilitating better tracking and user feedback.
{
request_id: "<idempotency id>",
campaign_id: "<interal campaign id>",
player_id: "<the external player id>"
}

Possible results:
  • Success.
  • Player not found.
  • Player not eligible.
  • Campaign is not active.
  • Campaign was not found.
  • Campaign is not API Opt in.
  • Player has already opted in.



Campaign Details API

The /api/v1/campaigns/details endpoint is updated to accept an optional campaign_id parameter, allowing users to request detailed information on a specific campaign if needed, or general campaign details when no ID is provided.


References

  •  Unibo Bridge API Documentation 
  •  Authentication API 
  •  Opt-In API 
  •  Campaign Details API