User Endpoints
Description of endpoints used to get data related to users and profiles on the DeSo blockchain
Last updated
Description of endpoints used to get data related to users and profiles on the DeSo blockchain
Last updated
Please make sure you've read Data: API so you are familiar with the following types referenced in this documentation:
POST
/api/v0/get-users-stateless
Get information about multiple users. This endpoint is used for retrieving data about a user after they log in, so the UI can adjust to the attributes of the user.
Request contains a list of public keys of users to fetch.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Get Users Stateless - Use GetUsersStateless to retrieve data about users upon login - Use GetUsersStateless to retrieve profiles for the Bithunt community projects leaderboard
PublicKeysBase58Check*
String[]
list of public keys
SkipForLeaderBoard
Boolean
Skips fetching all attributes other than the ProfileEntryResponse and PublicKeyBase58Check
GetUnminedBalance
Boolean
If true, get all UTXOs to compute the user's unmined balance. This is slower and not recommended.
POST
/api/v0/get-profiles
Get user profiles for searching by name or for the creator leaderboard.
Default number of returned profiles is 20.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Get Profiles - Use GetProfiles to search for users by username - Use GetProfiles to get profiles for the creator leaderboard
PublicKeyBase58Check
String
When provided, find the profile that contains the public key. The page of results returned by this endpoint will start at the profile that is next in the ordered list.
Username
String
When provided, find the profile that contains this username. The page of results returned by this endpoint will start at the profile that is next in the ordered list.
UsernamePrefix
String
username prefix. When provided, only return profiles with usernames that match this prefix
Descripton
String
Deprecated
OrderBy
String
Ordering method to be used on the result set
\
\
Must be one of
newest_last_post
,
newest_last_comment
, or
influencer_coin_price
NumToFetch
uint32
Number of profiles to fetch. Defaults to 20.
\
\
Must be less than 100
ReaderPublicKeyBase58Check
String
Reader public key
ModerationType
String
empty string, unrestricted
, or leaderboard
.
If unrestricted
, return all results. If leaderboard
, filter out both blacklisted and graylisted users. If empty string, filter out blacklisted users.
FetchUsersThatHODL
Boolean
If single profile is requested, return a list of HODLers
AddGlobalFeedBool
Boolean
If set to true posts in response will contain boolean if they are in global feed
POST
/api/v0/get-single-profile
Get information about single profile.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Get Single Profile - Use GetSingleProfile to get information to display on a user's profile page - Use GetSingleProfile to search for a profile by public key
PublicKeyBase58Check
String
public key of the profile to fetch
\
\
required if Username is not provided
Username
String
username of the profile to fetch
\
\
required if PublicKeyBase58Check is not provided
NoErrorOnMissing
Boolean
If true, do not throw a 404 error if there is no profile found. Instead, nil will be return for the Profile in the response body.
GET
/api/v0/get-single-profile-picture/{PublicKeyBase58Check}
Returns the profile picture of the given public key
Endpoint implementation in backend.
Example usage in frontend: - Construct the Get Single Profile Picture URL - Use GetSingleProfilePictureURL to get the profile picture for a user
PublicKeyBase58Check*
String
Public key of the user for whom we are fetching a profile picture
fallback
String
URL of the image to be used in the event that there is no profile picture for the public key provided
Image file of the profile picture is returned
POST
/api/v0/get-user-global-metadata
Get user metadata such as email and phone.
This endpoint requires a JWT, which can be retrieved from Identity.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Get User Global Metadata - Use GetUserGlobalMetadata to fetch email address to display on settings page
Note: this data is not stored on-chain.
UserPublicKeyBase58Check*
String
user public key
JWT*
String
JSON web token authenticating user
POST
/api/v0/update-user-global-metadata
Update user's email address and the state of messages that have been read.
This endpoint requires a JWT, which can be retrieved from Identity.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Update User Global Metadata - Use UpdateUserGlobalMetadata to update email address
UserPublicKeyBase58Check*
String
user public key
JWT*
String
JSON web token authenticating user
String
new email address. If provided, an email will be sent to verify this email address
MessageReadStateUpdatesByContact
Object with string keys and int values
A map with keys that represent public keys that have messaged this user. The values represent the index of the message read in the conversation between the two users.
No response body
GET
/api/v0/get-user-metadata/{PublicKeyBase58Check}
Get user metadata. Typically, this endpoint is used when reaching node.deso.org to get user metadata that should be merged with user metadata from one's local node.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Get User Metadata - Use GetUserMetadata to get additional data about a user to merge in with user metadata fetch from local node
PublicKeyBase58Check*
String
Public key of the user for whom we are fetching user metadata
POST
/api/v0/delete-pii
Deletes email address and phone number associated with this user from the node's global state.
This endpoint requires a JWT, which can be retrieved from Identity.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Delete PII - Use DeletePII to remove user's personal information at the user's request
PublicKeyBase58Check*
String
user public key that wants to delete their PII
JWT*
String
JSON web token authenticating user
No response body
POST
/api/v0/block-public-key
Block another user. Blocking a user hides that user from everything you see and the blocked user's comments on your posts will be hidden for all other users.
Note: Blocks are not currently stored on chain and thus a block only applies to the node on which a user is blocked.
This endpoint requires a JWT, which can be retrieved from Identity.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Block Public Key - Use BlockPublicKey to block a user as described above - Use BlockPublicKey to unblock a user
PublicKeyBase58Check*
String
user public key
JWT*
String
JSON web token authenticating user
BlockPublicKeyBase58Check*
String
blocked user public key
Unblock
Boolean
false if block, true if unblock
POST
/api/v0/get-user-derived-keys
Get a map of derived public keys to metadata about that derived key for a given master public key.
Endpoint implementation in backend.
PublicKeyBase58Check*
String
Public key for which we want to query derived keys
POST
/api/v0/delete-identities
Temporary route to wipe seedinfo cookies. This endpoint relies on identity api.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Delete Identities - Use DeleteIdentities to clean up legacy seedinfo storage