Get v1user social data - Terminal 3 Documentation
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
cURL
curl --request GET \
--url https://staging.terminal3.io/v1/user/{user_id}/social_data \
--header 'x-api-token: <x-api-token>'
Example Code Snippets
Python
import requests
url = "https://staging.terminal3.io/v1/user/{user_id}/social_data"
headers = {"x-api-token": "<x-api-token>"}
response = requests.get(url, headers=headers)
print(response.text)
JavaScript (Fetch)
const options = {method: 'GET', headers: {'x-api-token': '<x-api-token>'}};
fetch('https://staging.terminal3.io/v1/user/{user_id}/social_data', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.terminal3.io/v1/user/{user_id}/social_data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-token: <x-api-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
Go
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.terminal3.io/v1/user/{user_id}/social_data"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-token", "<x-api-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Java (Unirest)
HttpResponse<String> response = Unirest.get("https://staging.terminal3.io/v1/user/{user_id}/social_data")
.header("x-api-token", "<x-api-token>")
.asString();
Ruby
require 'uri'
require 'net/http'
url = URI("https://staging.terminal3.io/v1/user/{user_id}/social_data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-token"] = '<x-api-token>'
response = http.request(request)
puts response.read_body
Status Codes
- 200
- 400
- 401
- 403
- 422
Sample Response
{
"steam": {
"player_summaries": {
"steamid": "<string>",
"personastate": 123,
"personaname": "<string>"
},
"owned_games": {
"game_count": 123,
"games": [
{
"appid": "<string>",
"name": "<string>",
"playtime_2weeks": 123,
"playtime_forever": 123
}
]
},
"recent_played_games": {
"total_count": 123,
"games": [
{
"appid": "<string>",
"name": "<string>",
"playtime_2weeks": 123,
"playtime_forever": 123
}
]
}
},
"twitch": {
"username": "<string>",
"view_count": 123,
"follower_count": 123,
"followed_channels": {
"total": 123,
"broadcasters": [
{
"broadcaster_login": "<string>",
"broadcaster_name": "<string>",
"followed_at": "<string>"
}
]
}
},
"discord": {
"email_verified": true,
"guilds": [
{
"id": "<string>",
"name": "<string>",
"owner": true
}
]
},
"twitter": {
"followers_count": 123,
"friends_count": 123,
"listed_count": 123
}
}
Error Response
{
"errors": [
{
"code": "<string>",
"message": "<string>"
}
]
}