Get information about the authenticated user.
package main import( "context" "os" polargo "github.com/polarsource/polar-go" "log" ) func main() { ctx := context.Background() s := polargo.New( polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), ) res, err := s.Oauth2.Userinfo(ctx) if err != nil { log.Fatal(err) } if res.ResponseOauth2Userinfo != nil { // handle response } }
{ "sub": "<string>", "name": "<string>", "email": "<string>", "email_verified": true }
You can generate an Organization Access Token from your organization's settings.
Successful Response
The response is of type object.
object
Was this page helpful?