cURL
curl --request PUT \
--url https://api.twitterapi.io/twitter/update_profile_v3 \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"user_name": "<string>",
"name": "<string>",
"bio": "<string>",
"location": "<string>",
"website": "<string>",
"avatar": "<string>",
"banner": "<string>"
}
'import requests
url = "https://api.twitterapi.io/twitter/update_profile_v3"
payload = {
"user_name": "<string>",
"name": "<string>",
"bio": "<string>",
"location": "<string>",
"website": "<string>",
"avatar": "<string>",
"banner": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_name: '<string>',
name: '<string>',
bio: '<string>',
location: '<string>',
website: '<string>',
avatar: '<string>',
banner: '<string>'
})
};
fetch('https://api.twitterapi.io/twitter/update_profile_v3', 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.twitterapi.io/twitter/update_profile_v3",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'user_name' => '<string>',
'name' => '<string>',
'bio' => '<string>',
'location' => '<string>',
'website' => '<string>',
'avatar' => '<string>',
'banner' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.twitterapi.io/twitter/update_profile_v3"
payload := strings.NewReader("{\n \"user_name\": \"<string>\",\n \"name\": \"<string>\",\n \"bio\": \"<string>\",\n \"location\": \"<string>\",\n \"website\": \"<string>\",\n \"avatar\": \"<string>\",\n \"banner\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.twitterapi.io/twitter/update_profile_v3")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_name\": \"<string>\",\n \"name\": \"<string>\",\n \"bio\": \"<string>\",\n \"location\": \"<string>\",\n \"website\": \"<string>\",\n \"avatar\": \"<string>\",\n \"banner\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.twitterapi.io/twitter/update_profile_v3")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_name\": \"<string>\",\n \"name\": \"<string>\",\n \"bio\": \"<string>\",\n \"location\": \"<string>\",\n \"website\": \"<string>\",\n \"avatar\": \"<string>\",\n \"banner\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"msg": "<string>"
}{
"error": 123,
"message": "<string>"
}Update Profile V3
V3 Update Profile API - Update your X profile information. Only non-empty fields will be updated. You must have logged in via user_login_v3 first.
PUT
/
twitter
/
update_profile_v3
cURL
curl --request PUT \
--url https://api.twitterapi.io/twitter/update_profile_v3 \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"user_name": "<string>",
"name": "<string>",
"bio": "<string>",
"location": "<string>",
"website": "<string>",
"avatar": "<string>",
"banner": "<string>"
}
'import requests
url = "https://api.twitterapi.io/twitter/update_profile_v3"
payload = {
"user_name": "<string>",
"name": "<string>",
"bio": "<string>",
"location": "<string>",
"website": "<string>",
"avatar": "<string>",
"banner": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_name: '<string>',
name: '<string>',
bio: '<string>',
location: '<string>',
website: '<string>',
avatar: '<string>',
banner: '<string>'
})
};
fetch('https://api.twitterapi.io/twitter/update_profile_v3', 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.twitterapi.io/twitter/update_profile_v3",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'user_name' => '<string>',
'name' => '<string>',
'bio' => '<string>',
'location' => '<string>',
'website' => '<string>',
'avatar' => '<string>',
'banner' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.twitterapi.io/twitter/update_profile_v3"
payload := strings.NewReader("{\n \"user_name\": \"<string>\",\n \"name\": \"<string>\",\n \"bio\": \"<string>\",\n \"location\": \"<string>\",\n \"website\": \"<string>\",\n \"avatar\": \"<string>\",\n \"banner\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.twitterapi.io/twitter/update_profile_v3")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_name\": \"<string>\",\n \"name\": \"<string>\",\n \"bio\": \"<string>\",\n \"location\": \"<string>\",\n \"website\": \"<string>\",\n \"avatar\": \"<string>\",\n \"banner\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.twitterapi.io/twitter/update_profile_v3")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_name\": \"<string>\",\n \"name\": \"<string>\",\n \"bio\": \"<string>\",\n \"location\": \"<string>\",\n \"website\": \"<string>\",\n \"avatar\": \"<string>\",\n \"banner\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"msg": "<string>"
}{
"error": 123,
"message": "<string>"
}Authorizations
Body
application/json
Twitter username. Must be set. The user must have been logged in via user_login_v3.
Optional. Display name. Empty value will not update this field.
Optional. Profile bio/description. Empty value will not update this field.
Optional. Location. Empty value will not update this field.
Optional. Website URL. Empty value will not update this field.
Optional. Avatar image (base64 or URL). Empty value will not update this field.
Optional. Banner image (base64 or URL). Empty value will not update this field.
βI