Skip to content

How to get UserHandle by CID/URI ? #1883

Discussion options

You must be logged in to vote

You can't find the identity which created this post from just the record, you need the other metadata from the #commit message on the event stream. Specifically, the repo field of the com.atproto.sync.subscribeRepos#commit message is the DID of the repo (DID of the account).

Starting from a DID, you can resolve the identity metadata by resolving the DID document (either did:plc or did:web), extracting any handle for the account, and resolving the handle to confirm it is valid (points back to the correct DID). Usually a service would use a library to do this identity resolution, and also cache things locally for up to 24 hours to reduce the number of network requests.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by bnewbold
Comment options

You must be logged in to vote
1 reply
@bnewbold
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants