SongPop is a simple online music-guessing game, similar to Draw Something but with music. The APIs are pretty simple and relative to a version-specific URL, however the generic https://wam-mobile.appspot.com/ URL typically works.
User Accounts[edit | edit source]
SongPop supports two types of accounts:
- Accounts with a username and email address
- Accounts linked with a Facebook account
Accounts are created with a POST request to the /user/get-create-email/ or /user/get-create-fb/ endpoint, with parameters: username, isPremium, isDev, locale, email, deviceType (and also fuid, birthday, gender, v, fbName, and facebookAccessToken). This endpoint is also used for authentication of previously created accounts, you can check if it is a new account by checking the created parameter of the JSON response. Apart from this created parameter, the rest of the response is the user data, consisting of a user data object containing information about the user, and the pvp object containing information about the currently active games.
User data can also be retrieved with a GET request to the /user/data/ endpoint, and requires SongPop authentication.
Authentication[edit | edit source]
The user token and SongPop user id which can be found from the user data above must be sent as the url parameters authToken and userId respectively.
If authentication failed, the response will be a JSON object with a error string.
Game Data[edit | edit source]
A new game can be created with a GET request to the /quiz/get/ endpoint with the random url parameter set to 1 for a random player. This also requires SongPop authentication. The genreId is the genre for the song selection. The JSON response provides information on the opponent, the quiz state, and all songs and options for each part of the quiz stage. Song preview URLs are relative http://ccmq-samples.s3.amazonaws.com/songpop/ and are contained within the correct answer object. Incorrect answers only contain the possible title and artist.
When the quiz is finished and the challenge is to be sent, the data is POSTed to the /quiz/finish/ endpoint with the opponentId identifiying the quiz and the answers parameter is a JSON array of objects, each with the answerTime (in milliseconds), the usedPowerUp boolean, and the answerIndex for each song question. The response describes if any new achievements have been achieved.