Get User Info

get
Get User Info

https://api.bountyblok.io/v1/get_userinfo
This endpoint allows you to retrieve this user's details.
Request
Response
Request
Headers
Authorization
required
string
Bearer <<YOUR_API_KEY>>
Query Parameters
app_id
required
string
The app id where this account name exists in.
account_name
required
string
The account name or username of the user.
Response
200: OK
Get User Info successfully retrieved.
{
"account_name": "dimitest1111",
"id": "2724c839-c197-4e13-b099-75dad5af6614",
"is_active": true,
"challenges_completed": 10,
"tasks_completed": 21,
"tasks_logged": 54,
"total_achievements": 2,
"total_score": 5100,
"challenge_score_monthly": 2300,
"challenge_score_weekly": 1200,
"current_xp": 60,
"current_level": 3,
"next_level_xp": 100,
"message": null,
"is_valid": true,
}
404: Not Found
Could not find a user.
{
"is_valid": false,
"message": "User not found"
}
cURL
C#
Javascript
Python
PHP
cURL
curl --request GET
--url 'https://api.bountyblok.io/v1/get_userinfo?app_id=8a205981-61c9-4c27-bea7-ed42ab787040&account_name=dimitest1111'
--header 'authorization: Bearer <<YOUR_API_KEY>>'
--data '{}'
C#
var client = new RestClient("https://api.bountyblok.io/v1/get_userinfo?app_id=8a205981-61c9-4c27-bea7-ed42ab787040&account_name=dimitest1111");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Bearer <<YOUR_API_KEY>>");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Javascript
var data = "{}";
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bountyblok.io/v1/get_userinfo?app_id=8a205981-61c9-4c27-bea7-ed42ab787040&account_name=dimitest1111");
xhr.setRequestHeader("authorization", "Bearer <<YOUR_API_KEY_HERE>>");
xhr.send(data);
Python
import http.client
conn = http.client.HTTPSConnection("api.bountyblok.io")
payload = "{}"
headers = { 'authorization': "Bearer <<YOUR_API_KEY>>" }
conn.request("GET", "/v1/get_userinfo?app_id=8a205981-61c9-4c27-bea7-ed42ab787040&account_name=dimitest1111", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bountyblok.io/v1/get_userinfo?app_id=8a205981-61c9-4c27-bea7-ed42ab787040&account_name=dimitest1111",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "{}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer <<YOUR_API_KEY_HERE>>"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}