Get credentials status
curl --request GET \
--url https://api.example.com/v1/end-users/{endUserId}/credentialsimport requests
url = "https://api.example.com/v1/end-users/{endUserId}/credentials"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/end-users/{endUserId}/credentials', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/end-users/{endUserId}/credentials",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.example.com/v1/end-users/{endUserId}/credentials"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/end-users/{endUserId}/credentials")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/end-users/{endUserId}/credentials")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"endUserId": "<string>",
"platforms": {}
}End users
Get credentials status
Check which platforms have credentials configured for one of your end-users. Never returns the credentials themselves.
GET
/
v1
/
end-users
/
{endUserId}
/
credentials
Get credentials status
curl --request GET \
--url https://api.example.com/v1/end-users/{endUserId}/credentialsimport requests
url = "https://api.example.com/v1/end-users/{endUserId}/credentials"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/end-users/{endUserId}/credentials', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/end-users/{endUserId}/credentials",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.example.com/v1/end-users/{endUserId}/credentials"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/end-users/{endUserId}/credentials")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/end-users/{endUserId}/credentials")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"endUserId": "<string>",
"platforms": {}
}Path parameters
string
required
The end-user identifier.
Response — 200 OK
string
Echoed identifier.
object
Per-platform boolean flags indicating whether credentials are configured. Platforms not returned default to
false.{
"twitter": true,
"reddit": false,
"tiktok": true,
"instagram": false
}
The actual secret values are never returned. If you need to verify the specific tokens in use, rotate them by uploading fresh ones via
PUT .../credentials.Example
curl "$API_BASE/end-users/alice/credentials" \
-H "Authorization: Bearer $API_KEY"
status = client.end_users("alice").credentials.get()
print(status.platforms) # → {'twitter': True, 'tiktok': True, ...}
const status = await client.endUsers("alice").credentials.get();
console.log(status.platforms);
Common use case
Before running a task that needs a specific platform, check if the end-user has credentials configured — bail with a friendly message to your own user if not:Python
status = client.end_users(eu).credentials.get()
if not status.platforms.get("twitter"):
raise YourAppError("Twitter login required. Ask the user to connect.")
result = client.tasks.run(end_user_id=eu, task="...")
Errors
| Code | Meaning |
|---|---|
400 | endUserId > 256 chars |
401 | Missing Authorization header |
403 | Revoked API key |
