Leaderboard
Reminder: if you are using an app/client ID in sandbox, you must use sandbox.motar.io
as the endpoint for your requests. Requests to api.motar.io
with a sandbox client ID will fail!
Get Leaderboard Entries
GET
https://api.motar.io/leaderboard/v1
Returns leaderboard entries for your app using category filters.
Query Parameters
limit
integer
Number of results to return per page.
page
integer
Results page to return.
categories
array
Leaderboard categories to return. Can be an array or a comma-seperated string.
Headers
Authorization
string
Auth token generated by user login.
Get User Rank
GET
https://api.motar.io/leaderboard/v1/rank
Returns a leaderboard entry and the rank of a specific user.
Path Parameters
Authorization
string
Auth token generated by user login.
Query Parameters
categories
string
Leaderboard categories to return. Can be an array or a comma-seperated string.
user
string
User ID of the user to search for. If omitted the API will return the rank of the querying user.
Add/Update Leaderboard Entry
PUT
https://api.motar.io/leaderboard/v1
Adds or updates the leaderboard entry for the logged-in user.
Query Parameters
categories
array
Leaderboard categories to return. Can be an array or a comma-separated string. If an entry already exists for this user and these categories, it will be updated with the new score. Otherwise as new entry will be created.
score
integer
A numeric score indicator generated by your app.
Headers
Authorization
string
Auth token generated by user login.
Last updated