VerifyDomain
client.Organizations.DomainVerifications.Verify(ctx, body) (*OrganizationDomainVerificationVerifyResponse, error)
POST/gitpod.v1.OrganizationService/VerifyDomain
Verifies domain ownership for an organization.
Use this method to:
- Complete domain verification process
- Enable domain-based features
- Validate DNS configuration
Examples
-
Verify domain ownership:
Verifies ownership after DNS records are configured.
domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
VerifyDomain
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.Organizations.DomainVerifications.Verify(context.TODO(), gitpod.OrganizationDomainVerificationVerifyParams{
DomainVerificationID: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.DomainVerification)
}
{
"domainVerification": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"domain": "xxxx",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"state": "DOMAIN_VERIFICATION_STATE_UNSPECIFIED",
"createdAt": "2019-12-27T18:11:19.117Z",
"verificationToken": "verificationToken",
"verifiedAt": "2019-12-27T18:11:19.117Z"
}
}Returns Examples
{
"domainVerification": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"domain": "xxxx",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"state": "DOMAIN_VERIFICATION_STATE_UNSPECIFIED",
"createdAt": "2019-12-27T18:11:19.117Z",
"verificationToken": "verificationToken",
"verifiedAt": "2019-12-27T18:11:19.117Z"
}
}