curl --request GET \
--url https://api.themoviedb.org/3/account/{account_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.themoviedb.org/3/account/{account_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.themoviedb.org/3/account/{account_id}', 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.themoviedb.org/3/account/{account_id}",
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: Bearer <token>"
],
]);
$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.themoviedb.org/3/account/{account_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.themoviedb.org/3/account/{account_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.themoviedb.org/3/account/{account_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"avatar": {
"gravatar": {
"hash": "f35e00805bf2085dcc202ea42e3f4ba4"
},
"tmdb": {
"avatar_path": null
}
},
"id": 21666081,
"include_adult": false,
"iso_3166_1": "NG",
"iso_639_1": "en",
"name": "",
"username": "Emiloju"
}Get account by iD
This endpoint is used to get the details of a TMDB account by its ID.
curl --request GET \
--url https://api.themoviedb.org/3/account/{account_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.themoviedb.org/3/account/{account_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.themoviedb.org/3/account/{account_id}', 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.themoviedb.org/3/account/{account_id}",
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: Bearer <token>"
],
]);
$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.themoviedb.org/3/account/{account_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.themoviedb.org/3/account/{account_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.themoviedb.org/3/account/{account_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"avatar": {
"gravatar": {
"hash": "f35e00805bf2085dcc202ea42e3f4ba4"
},
"tmdb": {
"avatar_path": null
}
},
"id": 21666081,
"include_adult": false,
"iso_3166_1": "NG",
"iso_639_1": "en",
"name": "",
"username": "Emiloju"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
A unique numeric identifier for a user account on TMDB. See how to get account id here [blocked].
548
Query Parameters
A unique identifier for an authenticated user session. Usually used for user authentication [blocked]
"02a0e6d34dbd8325254e83c78918599076a62b0e"
Response
Request successful
User's avatar information, including Gravatar and TMDB profile images.
Show child attributes
Show child attributes
Unique identifier for the user account.
2166
Indicates whether the user allows adult content in their preferences.
false
User's country code in ISO 3166-1 format.
"NG"
Preferred language code of the user in ISO 639-1 format.
"en"
Full name of the user. May be empty if not set.
"Edun Rilwan"
Unique username of the user on TMDB.
"Emiloju"
