Low-latency AT Protocol interaction indexer.
20

Configure Feed

Select the types of activity you want to include in your feed.

add com.atproto.identity.resolveHandle

Aly Raffauf (Jul 4, 2026, 11:58 AM EDT) 88c78622 74c98821

+45
+43
internal/api/resolve_handle.go
··· 1 + package api 2 + 3 + import ( 4 + "context" 5 + "encoding/json" 6 + "log" 7 + "net/http" 8 + "time" 9 + 10 + "github.com/bluesky-social/indigo/api/atproto" 11 + "github.com/bluesky-social/indigo/atproto/syntax" 12 + ) 13 + 14 + func (s *Server) ResolveHandle(w http.ResponseWriter, r *http.Request) { 15 + query := r.URL.Query() 16 + 17 + rawHandle := query.Get("handle") 18 + if rawHandle == "" { 19 + http.Error(w, "handle is required", http.StatusBadRequest) 20 + return 21 + } 22 + 23 + handle, err := syntax.ParseHandle(rawHandle) 24 + if err != nil { 25 + http.Error(w, "invalid handle", http.StatusBadRequest) 26 + return 27 + } 28 + 29 + resolveCtx, cancel := context.WithTimeout(r.Context(), 10*time.Second) 30 + defer cancel() 31 + 32 + identity, err := s.Directory.LookupHandle(resolveCtx, handle) 33 + if err != nil { 34 + log.Println("resolve handle:", err) 35 + http.Error(w, "internal error", http.StatusInternalServerError) 36 + return 37 + } 38 + 39 + w.Header().Set("Content-Type", "application/json") 40 + json.NewEncoder(w).Encode(atproto.IdentityResolveHandle_Output{ 41 + Did: identity.DID.String(), 42 + }) 43 + }
+2
internal/api/server.go
··· 24 24 25 25 mux.HandleFunc("GET /xrpc/blue.microcosm.identity.resolveMiniDoc", s.GetMiniDidDoc) 26 26 27 + mux.HandleFunc("GET /xrpc/com.atproto.identity.resolveHandle", s.ResolveHandle) 28 + 27 29 return http.ListenAndServe(addr, withCORS(mux)) 28 30 } 29 31