Get identity graph by Lens username
curl --request GET \
--url https://api.memoryproto.co/identities/lens/{username} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.memoryproto.co/identities/lens/{username}"
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/identities/lens/{username}', 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/identities/lens/{username}",
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/identities/lens/{username}"
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/identities/lens/{username}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memoryproto.co/identities/lens/{username}")
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[
{
"id": "5650",
"platform": "farcaster",
"url": "https://farcaster.xyz/vitalik.eth",
"avatar": "https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/b663cd63-fecf-4d0f-7f87-0e0b6fd42800/original",
"social": null,
"username": "vitalik.eth",
"sources": [
{
"id": "5650",
"platform": "farcaster",
"verified": true
},
{
"id": "4458",
"platform": "talent-protocol",
"verified": true
}
]
},
{
"platform": "ens",
"id": "vitalik.eth",
"url": "https://app.ens.domains/vitalik.eth",
"username": null,
"avatar": "https://euc.li/vitalik.eth",
"social": null,
"sources": [
{
"id": "vitalik.eth",
"platform": "ens",
"verified": true
}
]
},
{
"id": "2230894",
"username": "vbuterin",
"url": "https://github.com/vbuterin",
"avatar": "https://avatars.githubusercontent.com/u/2230894?v=4",
"platform": "github",
"social": {
"verified": null,
"followers": 12663,
"following": 1
},
"sources": [
{
"id": "vitalik.eth",
"platform": "ens",
"verified": true
}
]
},
{
"id": "295218901",
"username": "vitalikbuterin",
"url": "https://x.com/vitalikbuterin",
"avatar": "https://pbs.twimg.com/profile_images/1895872023944937472/Uoyc5-p8_normal.jpg",
"platform": "twitter",
"social": {
"verified": true,
"followers": 5755832,
"following": 476
},
"sources": [
{
"id": "vitalik.eth",
"platform": "ens",
"verified": true
}
]
}
]"Unauthorized""<string>"Identity Graph Endpoints
Get identity graph by Lens username
Retrieve the identity graph for a user based on their Lens username.
GET
/
identities
/
lens
/
{username}
Get identity graph by Lens username
curl --request GET \
--url https://api.memoryproto.co/identities/lens/{username} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.memoryproto.co/identities/lens/{username}"
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/identities/lens/{username}', 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/identities/lens/{username}",
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/identities/lens/{username}"
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/identities/lens/{username}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memoryproto.co/identities/lens/{username}")
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[
{
"id": "5650",
"platform": "farcaster",
"url": "https://farcaster.xyz/vitalik.eth",
"avatar": "https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/b663cd63-fecf-4d0f-7f87-0e0b6fd42800/original",
"social": null,
"username": "vitalik.eth",
"sources": [
{
"id": "5650",
"platform": "farcaster",
"verified": true
},
{
"id": "4458",
"platform": "talent-protocol",
"verified": true
}
]
},
{
"platform": "ens",
"id": "vitalik.eth",
"url": "https://app.ens.domains/vitalik.eth",
"username": null,
"avatar": "https://euc.li/vitalik.eth",
"social": null,
"sources": [
{
"id": "vitalik.eth",
"platform": "ens",
"verified": true
}
]
},
{
"id": "2230894",
"username": "vbuterin",
"url": "https://github.com/vbuterin",
"avatar": "https://avatars.githubusercontent.com/u/2230894?v=4",
"platform": "github",
"social": {
"verified": null,
"followers": 12663,
"following": 1
},
"sources": [
{
"id": "vitalik.eth",
"platform": "ens",
"verified": true
}
]
},
{
"id": "295218901",
"username": "vitalikbuterin",
"url": "https://x.com/vitalikbuterin",
"avatar": "https://pbs.twimg.com/profile_images/1895872023944937472/Uoyc5-p8_normal.jpg",
"platform": "twitter",
"social": {
"verified": true,
"followers": 5755832,
"following": 476
},
"sources": [
{
"id": "vitalik.eth",
"platform": "ens",
"verified": true
}
]
}
]"Unauthorized""<string>"Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Get your API key at https://memoryproto.co/developers.
Example:
"Bearer mem_xxx"
Path Parameters
The Lens username of the user. For example, vitalik or jessepollak.
Examples:
"vitalik"
"jessepollak"
Query Parameters
Comma separated list of filtered sources
Example:
"farcaster,ens,talent-protocol"
Filter verified data sources.
Example:
"true"
Response
Successful response containing the identity graph linked to the provided Lens username.
Example:
[
{
"id": "5650",
"platform": "farcaster",
"url": "https://farcaster.xyz/vitalik.eth",
"avatar": "https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/b663cd63-fecf-4d0f-7f87-0e0b6fd42800/original",
"social": null,
"username": "vitalik.eth",
"sources": [
{
"id": "5650",
"platform": "farcaster",
"verified": true
},
{
"id": "4458",
"platform": "talent-protocol",
"verified": true
}
]
},
{
"platform": "ens",
"id": "vitalik.eth",
"url": "https://app.ens.domains/vitalik.eth",
"username": null,
"avatar": "https://euc.li/vitalik.eth",
"social": null,
"sources": [
{
"id": "vitalik.eth",
"platform": "ens",
"verified": true
}
]
},
{
"id": "2230894",
"username": "vbuterin",
"url": "https://github.com/vbuterin",
"avatar": "https://avatars.githubusercontent.com/u/2230894?v=4",
"platform": "github",
"social": {
"verified": null,
"followers": 12663,
"following": 1
},
"sources": [
{
"id": "vitalik.eth",
"platform": "ens",
"verified": true
}
]
},
{
"id": "295218901",
"username": "vitalikbuterin",
"url": "https://x.com/vitalikbuterin",
"avatar": "https://pbs.twimg.com/profile_images/1895872023944937472/Uoyc5-p8_normal.jpg",
"platform": "twitter",
"social": {
"verified": true,
"followers": 5755832,
"following": 476
},
"sources": [
{
"id": "vitalik.eth",
"platform": "ens",
"verified": true
}
]
}
]
⌘I