Retrieve
client.Invitations.Get(ctx, token, query) (*InvitationGetResponse, error)
GET/invitations/{token}
View invitation details by token without consuming the token
Parameters
token string
minLength1
maxLength500
Returns
Retrieve
package main
import (
"context"
"fmt"
"github.com/keycardai/keycard-go"
"github.com/keycardai/keycard-go/option"
)
func main() {
client := keycard.NewClient(
option.WithClientID("My Client ID"),
option.WithClientSecret("My Client Secret"),
)
invitation, err := client.Invitations.Get(
context.TODO(),
"token",
keycard.InvitationGetParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", invitation.CreatedByName)
}
{
"created_by_name": "created_by_name",
"email": "dev@stainless.com",
"expires_at": "2019-12-27T18:11:19.117Z",
"organization_name": "organization_name",
"role": "org_admin",
"status": "pending"
}Returns Examples
{
"created_by_name": "created_by_name",
"email": "dev@stainless.com",
"expires_at": "2019-12-27T18:11:19.117Z",
"organization_name": "organization_name",
"role": "org_admin",
"status": "pending"
}