User Points
A call to this endpoint will retrieve a given user's hardcore and softcore points.
HTTP Request
GET
https://retroachievements.org/API/API_GetUserPoints.php?u=Hexadigital
Query Parameters
Name | Required? | Description |
---|---|---|
y | Yes | Your web API key. |
u | Yes | The target username. |
Client Library
ts
import { buildAuthorization, getUserPoints } 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 userPoints = await getUserPoints(authorization, {
username: "Hexadigital",
});
kotlin
val credentials = RetroCredentials("<username>", "<web api key>")
val api: RetroInterface = RetroClient(credentials).api
val response: NetworkResponse<GetUserPoints.Response, ErrorResponse> = api.getUserPoints(
username = "Hexadigital"
)
if (response is NetworkResponse.Success) {
// handle the data
val userPoints: GetUserPoints.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
{
"Points": 31299,
"SoftcorePoints": 24264
}
json
{
"points": 31299,
"softcorePoints": 24264
}