Skip to main content

Authentication Commands

Manage App Store Connect API credentials and authentication

Overview

Authentication commands manage your App Store Connect API credentials. Credentials are stored securely in the system keychain when available, with a config file fallback.

Authentication Resolution

Credentials are resolved in this order:
  1. Selected profile (keychain or config)
  2. Environment variables (fallback for missing fields)
Use --strict-auth or ASC_STRICT_AUTH=true to fail when sources are mixed.

Commands

asc auth init

Create a template config.json for authentication.
boolean
default:"false"
Overwrite existing config.json
boolean
default:"false"
Write config.json to ./.asc in the current repo instead of ~/.asc
boolean
default:"false"
Open the App Store Connect API keys page in your browser
Examples:
Response:

asc auth login

Register and store App Store Connect API key credentials.
string
required
Friendly name for this key
string
required
App Store Connect API Key ID
string
required
App Store Connect Issuer ID
string
required
Path to private key (.p8) file
boolean
default:"false"
Store credentials in config.json instead of keychain
boolean
default:"false"
When bypassing keychain, write to ./.asc/config.json
boolean
default:"false"
Validate credentials with a lightweight API request
boolean
default:"false"
Skip JWT and network validation checks
Examples:
Output:

asc auth switch

Switch the default authentication profile.
string
required
Profile name to set as default
Examples:
Output:

asc auth logout

Remove stored API credentials.
boolean
default:"false"
Remove all stored credentials (default behavior)
string
Remove a named credential
Examples:
Output:

asc auth status

Show current authentication status.
string
default:"table"
Output format: table, json
boolean
default:"false"
Show detailed storage information
boolean
default:"false"
Validate stored credentials via network
Examples:
Response (table):
Response (JSON):

asc auth doctor

Diagnose authentication configuration issues.
string
default:"text"
Output format: text, json
boolean
default:"false"
Attempt to fix issues where possible
boolean
default:"false"
Confirm applying fixes (required with --fix)
Examples:
Response:

Environment Variables

  • ASC_KEY_ID - API Key ID
  • ASC_ISSUER_ID - Issuer ID
  • ASC_PRIVATE_KEY_PATH - Path to .p8 file
  • ASC_PRIVATE_KEY - PEM-encoded private key
  • ASC_PRIVATE_KEY_B64 - Base64-encoded private key
  • ASC_BYPASS_KEYCHAIN - Set to 1, true, yes, y, or on to bypass keychain
  • ASC_STRICT_AUTH - Set to true, 1, yes, y, or on to fail on mixed credential sources
  • ASC_PROFILE - Select a named profile

Generating API Keys

Generate API keys at: https://appstoreconnect.apple.com/access/integrations/api