Get Twitter profile
curl --request GET \
--url https://api.memoryproto.co/twitter \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.memoryproto.co/twitter"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.memoryproto.co/twitter', 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.memoryproto.co/twitter",
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.memoryproto.co/twitter"
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.memoryproto.co/twitter")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memoryproto.co/twitter")
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{
"data": {
"id": "1732464385174761474",
"username": "memoryprotocol",
"displayName": "Memory",
"followersCount": 1659,
"followingCount": 414,
"postsCount": 642,
"creationDate": "Wed Dec 06 18:18:03 +0000 2023",
"avatarUrl": "https://pbs.twimg.com/profile_images/1912179219758485514/WIKNnlqA_400x400.jpg",
"externalUrl": "http://memoryproto.co",
"location": "",
"bio": "Where your digital identity can move across the internet ☁︎",
"farcaster": {
"id": "244819",
"username": "memoryprotocol.eth",
"displayName": "Memory",
"followersCount": 929,
"followingCount": 73,
"avatarUrl": "https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/931fd467-68f8-4146-9487-a9017c0f6700/rectcrop3",
"location": "",
"bio": "The internet forgets you. Memory doesn’t."
}
}
}"You have run out of credits. Please purchase more to continue.""Twitter profile {username} not found.""Error getting Twitter profile {username}."Social Graph Endpoints
Get Twitter profile
Retrieve the Twitter profile with Farcaster linking from a username.
GET
/
twitter
Get Twitter profile
curl --request GET \
--url https://api.memoryproto.co/twitter \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.memoryproto.co/twitter"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.memoryproto.co/twitter', 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.memoryproto.co/twitter",
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.memoryproto.co/twitter"
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.memoryproto.co/twitter")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memoryproto.co/twitter")
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{
"data": {
"id": "1732464385174761474",
"username": "memoryprotocol",
"displayName": "Memory",
"followersCount": 1659,
"followingCount": 414,
"postsCount": 642,
"creationDate": "Wed Dec 06 18:18:03 +0000 2023",
"avatarUrl": "https://pbs.twimg.com/profile_images/1912179219758485514/WIKNnlqA_400x400.jpg",
"externalUrl": "http://memoryproto.co",
"location": "",
"bio": "Where your digital identity can move across the internet ☁︎",
"farcaster": {
"id": "244819",
"username": "memoryprotocol.eth",
"displayName": "Memory",
"followersCount": 929,
"followingCount": 73,
"avatarUrl": "https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/931fd467-68f8-4146-9487-a9017c0f6700/rectcrop3",
"location": "",
"bio": "The internet forgets you. Memory doesn’t."
}
}
}"You have run out of credits. Please purchase more to continue.""Twitter profile {username} not found.""Error getting Twitter profile {username}."Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Use an authorization token prefixed with Bearer. You can get your API key at https://memoryproto.co/dashboard.
Example:
"Bearer mem_xxx"
Query Parameters
Twitter username of the user. For example, MemoryProtocol or factory__fm.
Minimum string length:
1Examples:
"MemoryProtocol"
"factory__fm"
Response
Successful response containing the Twitter profile.
Twitter profile of the account.
Show child attributes
Show child attributes
Example:
{
"id": "1732464385174761474",
"username": "memoryprotocol",
"displayName": "Memory",
"followersCount": 1659,
"followingCount": 414,
"postsCount": 642,
"creationDate": "Wed Dec 06 18:18:03 +0000 2023",
"avatarUrl": "https://pbs.twimg.com/profile_images/1912179219758485514/WIKNnlqA_400x400.jpg",
"externalUrl": "http://memoryproto.co",
"location": "",
"bio": "Where your digital identity can move across the internet ☁︎",
"farcaster": {
"id": "244819",
"username": "memoryprotocol.eth",
"displayName": "Memory",
"followersCount": 929,
"followingCount": 73,
"avatarUrl": "https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/931fd467-68f8-4146-9487-a9017c0f6700/rectcrop3",
"location": "",
"bio": "The internet forgets you. Memory doesn’t."
}
}
⌘I