Get information about an access token.
Go
package main import( "context" macropaygo "github.com/web3group/macropay-go-main" "github.com/web3group/macropay-go-main/models/components" "log" ) func main() { ctx := context.Background() s := macropaygo.New() res, err := s.Oauth2.Introspect(ctx, components.IntrospectTokenRequest{ Token: "<value>", ClientID: "<id>", ClientSecret: "<value>", }) if err != nil { log.Fatal(err) } if res.IntrospectTokenResponse != nil { // handle response } }
{ "active": true, "client_id": "<string>", "scope": "<string>", "sub": "<string>", "aud": "<string>", "iss": "<string>", "exp": 123, "iat": 123 }
access_token
refresh_token
Successful Response
user
organization