Get Challenge Progress

get
Get Challenge Progress

https://api.bountyblok.io/v1/get_challenge_progress
This endpoint allows you to retrieve the challenge progress for a user.
Request
Response
Request
Headers
Authorization
required
string
Bearer <<YOUR_API_KEY>>
Query Parameters
challenge_id
required
string
The challenge id of the challenge progress that is being retrieved for this user.
account_name
required
string
The account name or the username.
Response
200: OK
Challenge progress successfully retrieved.
{
"challenge_id": "8a205981-61c9-4c27-bea7-ed42ab787040",
"challenge_name": "Karma Hero",
"task_progresses":
[
{
"task_id": "1606dc72-a915-4975-95ba-64cae14800e0",
"task_name": "Vote 10 times",
"quantity_required": 10.0000,
"quantity_completed": 5.0000,
"message": null
},
{
"task_id": "74fbea07-3d7a-49c2-aa55-b2a0189d5c56",
"task_name": "Share 3 times",
"quantity_required": 3.0000,
"quantity_completed": 3.0000,
"message": null
},
{
"task_id": "f948816f-7073-4159-b877-0091d9a66bb5",
"task_name": "Comment 1 time",
"quantity_required": 1.0000,
"quantity_completed": 2.0000,
"message": null
}
],
"tasks_required": 5,
"tasks_completed": 5,
"message": null,
"is_valid": true
}
404: Not Found
Could not find challenge progress for this account name.
{
"is_valid": false,
"message": "Challenge was not found."
}
cURL
C#
Javascript
Python
PHP
cURL
curl --request GET
--url 'https://api.bountyblok.io/v1/get_challenge_progress?challenge_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_challenge_progress?challenge_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_challenge_progress?challenge_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_challenge_progress?challenge_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_challenge_progress?challenge_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;
}