Galaxy Docs
Search
⌃K

REST API

If you use an engine other than Unity, Cordova, or HTML5, you can access our service through a REST API. Send data as JSON (not form data) when testing.
post
https://api.galaxysdk.com/api/v1
/signup/anonymous
Get Token
Player ID: Get the player ID from the token by decoding the base64 string and extracting the value under the user_id key.
post
https://api.galaxysdk.com/api/v1
/client/leaderboards/:leaderboard_id/report_score
Submit score (client)
post
https://api.galaxysdk.com/api/v1
/server/report_scores
Submit score (server)
get
https://api.galaxysdk.com/api/v1
/client/leaderboards/:leaderboard_id/players/:player_id
Get player record
Show the leaderboard
Open this URL in a webview or in app browser:
https://app.galaxy.us/leaderboards/:leaderboard_id?token=<token>&hideCloseButton=true
Change hideCloseButton to false if you want to use the close button in the UI. However, you need to listen for URLs with query string sdk_action=close_window and close the webview.
Show the avatar
Get the avatar image from this URL:
https://api.galaxysdk.com/api/v1/users/{galaxy player id}/avatar.png