## ListSCMOrganizations `client.Runners.ListScmOrganizations(ctx, params) (*RunnerListScmOrganizationsResponse, error)` **post** `/gitpod.v1.RunnerService/ListSCMOrganizations` Lists SCM organizations the user belongs to. Use this method to: - Get all organizations for a user on a specific SCM host - Check organization admin permissions for webhook creation ### Examples - List GitHub organizations: Lists all organizations the user belongs to on GitHub. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" scmHost: "github.com" ``` ### Parameters - `params RunnerListScmOrganizationsParams` - `Token param.Field[string]` Query param - `PageSize param.Field[int64]` Query param - `RunnerID param.Field[string]` Body param - `ScmHost param.Field[string]` Body param: The SCM host to list organizations from (e.g., "github.com", "gitlab.com") ### Returns - `type RunnerListScmOrganizationsResponse struct{…}` - `Organizations []RunnerListScmOrganizationsResponseOrganization` List of organizations the user belongs to - `IsAdmin bool` Whether the user has admin permissions in this organization. Admin permissions typically allow creating organization-level webhooks. - `Name string` Organization name/slug (e.g., "gitpod-io") - `URL string` Organization URL (e.g., "https://github.com/gitpod-io") ### Example ```go 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"), ) response, err := client.Runners.ListScmOrganizations(context.TODO(), gitpod.RunnerListScmOrganizationsParams{ RunnerID: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"), ScmHost: gitpod.F("github.com"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Organizations) } ``` #### Response ```json { "organizations": [ { "isAdmin": true, "name": "name", "url": "url" } ] } ```