User Unlocks (most recent)
A call to this endpoint will retrieve a list of a target user's recently unlocked achievements, via their username. By default, it fetches achievements unlocked in the last hour.
On-site Representation
A user's recent unlocks can be found in a few places. It is most often seen on the user profile in the most recently played games:
The recent unlocks can also be found on the "Unlocked Achievements" page:
HTTP Request
GET
https://retroachievements.org/API/API_GetUserRecentAchievements.php?u=Scott
Query Parameters
Name | Required? | Description |
---|---|---|
y | Yes | Your web API key. |
u | Yes | The target username. |
m | Minutes to look back. Defaults to 60. |
Client Library
ts
import {
buildAuthorization,
getUserRecentAchievements,
} from "@retroachievements/api";
// First, build your authorization object.
const username = "<your username on RA>";
const webApiKey = "<your web API key>";
const authorization = buildAuthorization({ username, webApiKey });
// Then, make the API call.
const userRecentAchievements = await getUserRecentAchievements(authorization, {
username: "xelnia",
});
kotlin
val credentials = RetroCredentials("<username>", "<web api key>")
val api: RetroInterface = RetroClient(credentials).api
val response: NetworkResponse<GetUserRecentAchievements.Response, ErrorResponse> = api.getUserRecentAchievements(
username = "xelnia",
)
if (response is NetworkResponse.Success) {
// handle the data
val recentAchievements: GetUserRecentAchievements.Response = response.body
} else if (response is NetworkResponse.Error) {
// if the server returns an error it be found here
val errorResponse: ErrorResponse? = response.body
// if the api (locally) had an internal error, it'll be found here
val internalError: Throwable? = response.error
}
Response
json
[
{
"Date": "2023-12-27 16:04:50",
"HardcoreMode": 1,
"AchievementID": 98012,
"Title": "Beginner I",
"Description": "Clear stages 01 - 05 in Quest.",
"BadgeName": "108302",
"Points": 5,
"TrueRatio": 25,
"Type": null,
"Author": "jos",
"GameTitle": "Pokemon Pinball mini",
"GameIcon": "/Images/028399.png",
"GameID": 14715,
"ConsoleName": "Pokemon Mini",
"BadgeURL": "/Badge/108302.png",
"GameURL": "/game/14715"
}
]
json
[
{
"date": "2023-05-23 22:32:24",
"hardcoreMode": true,
"achievementId": 51214,
"title": "You're a special Champ!",
"description": "Win the Tournament as [You] on Hard with 1 attribute on max. and 1 attribute on min.",
"badgeName": "121991",
"points": 25,
"trueRatio": 100,
"type": null,
"author": "Som1",
"gameTitle": "WWF King of the Ring",
"gameIcon": "/Images/062599.png",
"gameId": 6316,
"consoleName": "Game Boy",
"badgeUrl": "/Badge/121991.png",
"gameUrl": "/game/6316"
}
]