Skip to content
Scalekit Docs
Talk to an EngineerDashboard

OAuth clients

OAuth clients for applications

Manage OAuth clients for applications that use Scalekit as an authorization server.

Register clients for your apps, rotate secrets carefully, and scope clients to the right application type.

clientClientshttps://github.com/scalekit-inc/scalekit-sdk-go/blob/main/clients.go
#asyncCreateClient

Runs CreateClient and returns the result.

paramctxcontext.Context

Request context

paramclientclientsv1.CreateClient

Client.

returnsCreateClientResponse

The created resource.

import (
clients "github.com/scalekit-inc/scalekit-sdk-go/v2/pkg/grpc/scalekit/v1/clients"
)
created, err := scalekitClient.Client().CreateClient(ctx, &clients.CreateClient{
Name: "My Application",
ClientType: "WEB_APP",
PostLoginUris: []string{"https://myapp.com/callback"},
PostLogoutRedirectUris: []string{"https://myapp.com/logout"},
})
if err != nil {
// handle
}
_ = created.Client
clientClientshttps://github.com/scalekit-inc/scalekit-sdk-go/blob/main/clients.go
#asyncGetClient

Runs GetClient and returns the result.

paramctxcontext.Context

Request context

paramclientIdstring

Client ID.

returnsGetClientResponse

The response payload for this operation.

got, err := scalekitClient.Client().GetClient(ctx, "client_123")
if err != nil {
// handle
}
_ = got.Client
clientClientshttps://github.com/scalekit-inc/scalekit-sdk-go/blob/main/clients.go
#asyncListClients

Runs ListClients and returns the result.

paramctxcontext.Context

Request context

paramoptionsListClientsOptions

Optional request settings.

returnsListClientsResponse

Paginated results.

clients, err := scalekitClient.Client().ListClients(ctx, &scalekit.ListClientsOptions{
PageSize: 10,
PageToken: "",
})
if err != nil {
// handle
}
for _, c := range clients.Clients {
_ = c
}
clientClientshttps://github.com/scalekit-inc/scalekit-sdk-go/blob/main/clients.go
#asyncUpdateClient

Runs UpdateClient and returns the result.

paramctxcontext.Context

Request context

paramclientIdstring

Client ID.

paramclientclientsv1.UpdateClient

Client.

parammaskfieldmaskpb.FieldMask

Mask.

returnsUpdateClientResponse

The updated resource.

import (
clients "github.com/scalekit-inc/scalekit-sdk-go/v2/pkg/grpc/scalekit/v1/clients"
"google.golang.org/protobuf/types/known/fieldmaskpb"
)
updated, err := scalekitClient.Client().UpdateClient(ctx, "client_123", &clients.UpdateClient{
Name: "Updated Name",
}, &fieldmaskpb.FieldMask{
Paths: []string{"name"},
})
if err != nil {
// handle
}
_ = updated.Client
clientClientshttps://github.com/scalekit-inc/scalekit-sdk-go/blob/main/clients.go
#asyncDeleteClient

Runs DeleteClient and returns the result.

paramctxcontext.Context

Request context

paramclientIdstring

Client ID.

returnserror

error

if err := scalekitClient.Client().DeleteClient(ctx, "client_123"); err != nil {
// handle
}
clientClientshttps://github.com/scalekit-inc/scalekit-sdk-go/blob/main/clients.go
#asyncAddClientSecret

Runs AddClientSecret and returns the result.

paramctxcontext.Context

Request context

paramclientIdstring

Client ID.

returnsCreateClientSecretResponse

The created resource.

clientClientshttps://github.com/scalekit-inc/scalekit-sdk-go/blob/main/clients.go
#asyncRemoveClientSecret

Runs RemoveClientSecret and returns the result.

paramctxcontext.Context

Request context

paramclientIdstring

Client ID.

paramsecretIdstring

Secret id.

returnserror

error