M2M clients
Machine-to-machine clients and tokens
Use M2M client APIs to create and manage machine-to-machine OAuth clients and secrets for service-to-service auth.
Create an M2M client, store the secret securely, then obtain tokens with client credentials.
createOrganizationClient
Section titled “createOrganizationClient”#asynccreateOrganizationClient
Interface for managing M2M (machine-to-machine) API clients per organization.
The organization ID to create the client for
Client.
The created resource.
import com.scalekit.grpc.scalekit.v1.clients.OrganizationClient;
OrganizationClient orgClient = OrganizationClient.newBuilder() .setName("Production Service Account") .build();
scalekitClient.m2m().createOrganizationClient("org_123", orgClient);getOrganizationClient
Section titled “getOrganizationClient”#asyncgetOrganizationClient
Retrieves details of a specific M2M scalekitClient.
The organization ID
The client ID (format: skc_xxxxx)
The response payload for this operation.
scalekitClient.m2m().getOrganizationClient("org_123", "skc_xxxxx");updateOrganizationClient
Section titled “updateOrganizationClient”#asyncupdateOrganizationClient
Updates the configuration of an existing M2M scalekitClient.
The organization ID
The client ID to update
OrganizationClient proto with fields to update
The updated resource.
import com.scalekit.grpc.scalekit.v1.clients.OrganizationClient;
OrganizationClient updates = OrganizationClient.newBuilder() .setName("Updated Service Account Name") .build();
scalekitClient.m2m().updateOrganizationClient("org_123", "skc_xxxxx", updates);deleteOrganizationClient
Section titled “deleteOrganizationClient”#asyncdeleteOrganizationClient
Permanently deletes an M2M client from an organization.
The organization ID
The client ID to delete
No return value
scalekitClient.m2m().deleteOrganizationClient("org_123", "skc_xxxxx");addOrganizationClientSecret
Section titled “addOrganizationClientSecret”#asyncaddOrganizationClientSecret
Adds a new secret to an M2M scalekitClient.
The organization ID
The client ID to add a secret to
The created resource.
removeOrganizationClientSecret
Section titled “removeOrganizationClientSecret”#asyncremoveOrganizationClientSecret
Permanently removes a secret from an M2M scalekitClient.
The organization ID
The client ID
The secret ID to remove
No return value
listOrganizationClients
Section titled “listOrganizationClients”#asynclistOrganizationClients
Lists all M2M clients for an organization with pagination.
The organization ID
Page size (between 10 and 100; 0 uses server default)
Pagination cursor for next page (null or empty for first page).
Paginated results.
scalekitClient.m2m().listOrganizationClients("org_123", 20, "");