Skip to content
Ona Docs

GetOrganizationInvite

client.Organizations.Invites.Get(ctx, body) (*OrganizationInviteGetResponse, error)
POST/gitpod.v1.OrganizationService/GetOrganizationInvite

GetOrganizationInvite

ParametersExpand Collapse
body OrganizationInviteGetParams
OrganizationID param.Field[string]
formatuuid
ReturnsExpand Collapse
type OrganizationInviteGetResponse struct{…}
InviteID string

invite_id is the unique identifier of the invite to join the organization. Use JoinOrganization with this ID to join the organization.

formatuuid

GetOrganizationInvite

package main

import (
  "context"
  "fmt"

  "github.com/gitpod-io/gitpod-sdk-go"
  "github.com/gitpod-io/gitpod-sdk-go/option"
)

func main() {
  client := gitpod.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  invite, err := client.Organizations.Invites.Get(context.TODO(), gitpod.OrganizationInviteGetParams{
    OrganizationID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", invite.Invite)
}
{
  "invite": {
    "inviteId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
  }
}
Returns Examples
{
  "invite": {
    "inviteId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
  }
}