@cpod/sdk - v0.2.7
    Preparing search index...

    Function createAPIToken

    • Create a new API token for programmatic access

      Parameters

      • Optionalrequest: CreateAPITokenRequest

        Optional token configuration (name, expiry)

      Returns Promise<CreateAPITokenResponse>

      Created token response with the token value (only shown once)

      401 - Not authenticated

      import { createAPIToken } from "@cpod/sdk";

      const token = await createAPIToken({
      name: "CI/CD Pipeline Token",
      expires_in_days: 90,
      });
      // Save this token securely - it won't be shown again
      console.log(`Token: ${token.token}`);