Credits & Profile
Get apiuserprofile
Get the authenticated user’s profile, including remaining credits, subscription plan, and billing period dates.
Prerequisites: Authenticated with a valid JWT.
GET
/
api
/
user
/
profile
/
cURL
curl -X GET 'https://www.spherescout.io/api/user/profile/' \
-H 'Authorization: Token YOUR_API_KEY' \
-H 'User-Agent: SphereScout/1.0'import requests
response = requests.get(
"https://www.spherescout.io/api/user/profile/",
headers={
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
},
)
print(response.json())const response = await fetch("https://www.spherescout.io/api/user/profile/", {
headers: {
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
},
});
const data = await response.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.spherescout.io/api/user/profile/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.spherescout.io/api/user/profile/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.spherescout.io/api/user/profile/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.spherescout.io/api/user/profile/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 123,
"subscription_plan": {
"plan_type": "<string>",
"monthly_credits": -1,
"price_per_month": "<string>",
"link_expiration_days": -1,
"product_id": "<string>",
"price_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_active": true,
"is_sellable": true,
"allows_fresh_exports": true
},
"total_credits": 123,
"purchased_credits_available": 123,
"purchased_credits_expiring_soon": 123,
"can_download_fresh_exports": true,
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>",
"remaining_credits": -1,
"current_period_start": -1,
"current_period_end": -1,
"preferred_language": "bg"
}Authorizations
API key. Format: Token
Response
200 - application/json
Current subscription plan details, or null.
Show child attributes
Show child attributes
Total credits per billing cycle (from subscription plan). 0 if no plan.
Purchased credits currently available and not expired.
Purchased credits expiring in the next 7 days.
Maximum string length:
254Maximum string length:
150Maximum string length:
150Subscription credits available right now.
Required range:
-2147483648 <= x <= 2147483647Start of the current billing period (ISO 8601).
Required range:
-2147483648 <= x <= 2147483647End of the current billing period (ISO 8601).
Required range:
-2147483648 <= x <= 2147483647Two-letter UI language preference.
bg- Bulgariancs- Czechda- Danishde- Germanel- Greekfr- Frenchen- Englishes- Spanishet- Estonianfi- Finnishhe- Hebrewhr- Croatianhu- Hungarianit- Italianlt- Lithuanianlv- Latviannb- Norwegiannl- Dutchpl- Polishpt- Portuguesero- Romaniansk- Slovaksl- Sloveniansr- Serbiansv- Swedishth- Thaitr- Turkish
Available options:
bg, cs, da, de, el, fr, en, es, et, fi, he, hr, hu, it, lt, lv, nb, nl, pl, pt, ro, sk, sl, sr, sv, th, tr ⌘I
cURL
curl -X GET 'https://www.spherescout.io/api/user/profile/' \
-H 'Authorization: Token YOUR_API_KEY' \
-H 'User-Agent: SphereScout/1.0'import requests
response = requests.get(
"https://www.spherescout.io/api/user/profile/",
headers={
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
},
)
print(response.json())const response = await fetch("https://www.spherescout.io/api/user/profile/", {
headers: {
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
},
});
const data = await response.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.spherescout.io/api/user/profile/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.spherescout.io/api/user/profile/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.spherescout.io/api/user/profile/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.spherescout.io/api/user/profile/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 123,
"subscription_plan": {
"plan_type": "<string>",
"monthly_credits": -1,
"price_per_month": "<string>",
"link_expiration_days": -1,
"product_id": "<string>",
"price_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_active": true,
"is_sellable": true,
"allows_fresh_exports": true
},
"total_credits": 123,
"purchased_credits_available": 123,
"purchased_credits_expiring_soon": 123,
"can_download_fresh_exports": true,
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>",
"remaining_credits": -1,
"current_period_start": -1,
"current_period_end": -1,
"preferred_language": "bg"
}