Using the Trivia API

Offer a seamless experience with our API designed for Trivia events!

Victor Aquino avatar
Written by Victor Aquino
Updated over a week ago

SocialPoint's endpoints allow you to gather, update and push data on your existing Trivia Games to take attendee interaction to the next level.

Here are the most popular ways in which our customers use the endpoints:


Auto-login to Trivia

This is the most common and useful way to integrate your apps with SocialPoint seamlessly.

Before we get started, it's important that we go over what Auto-login means in the backend. To be clear, the system does not create an account for players to access, update the score, or rename the user. So technically players are not logging in, we use the term for ease of understanding.

The API allows you to gather data from other sources and send it over to SocialPoint so people don't have to fill out their name, email, or other data collection used in the game. This ensures that your players don't have to go through the process of entering their information multiple times, as well as minimize mistakes when entering personal information that could lead to hassles when comparing scores and activities across multiple games and platforms.

To get Auto-login working on your game, make sure you:

  1. Setup a Trivia Game in the backend. Do this by navigating to Trivia > Configurations and clicking on the blue "Add" button. The Wizard will guide you through the process.

  2. Get your API key and add it to your code.

  3. Set your requests depending on what information you want to pass on from your platform into the game.

  4. Test the code and watch out for the responses you get back from us.

  5. Navigate to Trivia > Players to make sure the data being transferred over matches what you have on your platform.

If the right data is being carried over and you can run the game without having to enter your information, then you're all set!

URL Template

Here is the URL template to use the Auto-Login feature:

URL: {{ player app url }}?firstName={{ firstName }}&lastName={{ lastName }}&email={{ email }}

Variables

Game data:

{{ player app url }} - can be found in the display manager, under the Mobile Links section or provided by Customer Success

Player Data:

{{ firstName }} - The player's First Name

{{ lastName }} - The player's Last Name

{{ email }} - The player's email

{{ pin }} - The player's PIN (pre-registration only)

{{ lastName }} - The player's Full Name (when registering without email only)

{{ teamId }} - The player's Team ID

Usage

There are 3 different scenarios when using the Auto-Login feature for Trivia:

  • The first one is when you use firstName, lastName, and email. Your players will register and automatically login in a single step.

  • The second scenario allows you to register and login players using fullName only.

  • The third scenario is when you want your players to access the game using a PIN. You MUST pre-register your players and set a PIN for this option to work.

In this example, we're registering and auto-logging into an existing trivia game with "Test User" as first and last name, and "testuser@test.com" as the email address.

https://app.socialpoint.io/apps/ars/trivia/apg-and-trivia/3-strikes?firstName=Test&lastName=User&email=testuser@test.com

In this other example, we are registering and auto-logging into an existing trivia game using the player's full name ONLY.

https://app.socialpoint.io/apps/ars/trivia/apg-and-trivia/two-minute-drill?fullName=MeredithBonham

This last example logs you in using a PIN that has been assigned to an already existing player.

https://app.socialpoint.io/apps/ars/trivia/apg-and-trivia/countdown?pin=123456


Allowing access with a Password

This feature works best when you already have a list of registered participants and you want the API to allow access with a password.

If this is your case, you want to follow these steps:

  1. Setup a Trivia Game in the backend. Do this by navigating to Trivia > Configurations and clicking on the blue "Add" button. Be sure to select

  2. Navigate to Trivia > Players and upload your player list, making sure you set a password for each player using the PIN column. Click here to learn more about uploading players into the game.

  3. Get your API key and add it to your code.

  4. Set your requests using the PIN as your variable.

  5. Test the code and watch out for the responses you get back from us.

  6. Navigate to Trivia > Players to make sure the data being transferred over matches what you have on your platform.


Retrieving player data from a Trivia game

This feature is used by organizations who want to transfer scores from SocialPoint into their platform for multiple uses: leaderboards, rewards, data-tracking, cross-platform challenges, etc.

Follow these steps to access our endpoint and gather participant data:

  1. Get your API key and add it to your code.

  2. Set your requests to GET the information you need from your players. Choose from any of the variables available.

  3. Test the code and watch out for the responses you get back from us.

  4. Make sure the data you are getting from us is the one you need.

Did this answer your question?