Set up Scalekit
Create your account, install the SDK, and verify your setup to start building with Scalekit
This guide shows you how to set up Scalekit in your development environment. You’ll create an account, configure your workspace, get API credentials, install the SDK, and verify everything works correctly.
Scalekit provides official SDKs for Node.js, Python, Go, and Java with production-ready auth helpers, automatic retries, and typed models to help you integrate faster.
-
Scalekit provides dedicated development and production auth environments. Use them to manage your authentication services for each stage of your app.
Create a Scalekit accountAfter creating your account, a scalekit workspace is set up for you. You will have two environments:
Environment URLs https://{your-subdomain}.scalekit.dev (Development)https://{your-subdomain}.scalekit.com (Production)View your environment URLs in Dashboard > Developers > Settings.
-
Scalekit uses the OAuth 2.0 client credentials flow for secure API authentication.
Navigate to Dashboard > Developers > Settings > API credentials and copy these values:
.env SCALEKIT_ENVIRONMENT_URL=<your-environment-url> # Example: https://acme.scalekit.dev or https://auth.acme.com (if custom domain is set)SCALEKIT_CLIENT_ID=<app-client-id> # Example: skc_1234567890abcdefSCALEKIT_CLIENT_SECRET=<app-client-secret> # Example: test_abcdef1234567890 -
Choose your preferred language and install the Scalekit SDK:
npm install @scalekit-sdk/nodepip install scalekit-sdk-pythongo get -u github.com/scalekit-inc/scalekit-sdk-go/* Gradle users - add the following to your dependencies in build file */implementation "com.scalekit:scalekit-sdk-java:2.0.6"<!-- Maven users - add the following to your `pom.xml` --><dependency><groupId>com.scalekit</groupId><artifactId>scalekit-sdk-java</artifactId><version>2.0.6</version></dependency>After installation, initialize the SDK with your credentials:
Initialize SDK import { Scalekit } from '@scalekit-sdk/node';// Initialize the Scalekit client with your credentialsconst scalekit = new Scalekit(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET);Initialize SDK from scalekit import ScalekitClientimport os# Initialize the Scalekit client with your credentialsscalekit_client = ScalekitClient(env_url=os.getenv('SCALEKIT_ENVIRONMENT_URL'),client_id=os.getenv('SCALEKIT_CLIENT_ID'),client_secret=os.getenv('SCALEKIT_CLIENT_SECRET'))Initialize SDK import ("os""github.com/scalekit-inc/scalekit-sdk-go")// Initialize the Scalekit client with your credentialsscalekitClient := scalekit.NewScalekitClient(os.Getenv("SCALEKIT_ENVIRONMENT_URL"),os.Getenv("SCALEKIT_CLIENT_ID"),os.Getenv("SCALEKIT_CLIENT_SECRET"),)Initialize SDK import com.scalekit.ScalekitClient;// Initialize the Scalekit client with your credentialsScalekitClient scalekitClient = new ScalekitClient(System.getenv("SCALEKIT_ENVIRONMENT_URL"),System.getenv("SCALEKIT_CLIENT_ID"),System.getenv("SCALEKIT_CLIENT_SECRET")); -
Verify your setup
Test your configuration by listing organizations in your workspace. This confirms your credentials work correctly.
Authenticate with client credentials # Get an access tokencurl https://<SCALEKIT_ENVIRONMENT_URL>/oauth/token \-X POST \-H 'Content-Type: application/x-www-form-urlencoded' \-d 'client_id=<SCALEKIT_CLIENT_ID>' \-d 'client_secret=<SCALEKIT_CLIENT_SECRET>' \-d 'grant_type=client_credentials'This returns an access token:
{"access_token": "eyJhbGciOiJSUzI1NiIsImInR5cCI6IkpXVCJ9...","token_type": "Bearer","expires_in": 86399,"scope": "openid"}Use the token to access the Scalekit API
List organizations curl -L '<SCALEKIT_ENVIRONMENT_URL>/api/v1/organizations?page_size=5' \-H 'Authorization: Bearer <ACCESS_TOKEN>'8 collapsed linesimport { ScalekitClient } from '@scalekit-sdk/node';const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,);const { organizations } = await scalekit.organization.listOrganization({pageSize: 5,});console.log(`Name of the first organization: ${organizations[0].display_name}`);9 collapsed linesfrom scalekit import ScalekitClient# Initialize the SDK clientscalekit_client = ScalekitClient('<SCALEKIT_ENVIRONMENT_URL>','<SCALEKIT_CLIENT_ID>','<SCALEKIT_CLIENT_SECRET>')org_list = scalekit_client.organization.list_organizations(page_size='100')print(f'Organisation details: {org_list[0]}')5 collapsed linesscalekitClient := scalekit.NewScalekitClient(<SCALEKIT_ENVIRONMENT_URL>,<SCALEKIT_CLIENT_ID>,<SCALEKIT_CLIENT_SECRET>)organization, err := scalekitClient.Organization.GetOrganization(ctx,organizationId)7 collapsed linesimport com.scalekit.ScalekitClient;ScalekitClient scalekitClient = new ScalekitClient("<SCALEKIT_ENVIRONMENT_URL>","<SCALEKIT_CLIENT_ID>","<SCALEKIT_CLIENT_SECRET>");ListOrganizationsResponse organizations = scalekitClient.organizations().listOrganizations(5, "");If you see organization data, your setup is complete! You’re now ready to implement authentication in your application.
GitHub repositories
Section titled “GitHub repositories”Explore the available SDKs with detailed release notes, version information, and direct access to GitHub repositories.