# Function resolveToken

- resolveToken(config?: TokenResolverConfig): Promise<Result<ScmToken, Error>>

  Resolves an SCM token using the priority chain:

  1. Explicit config
  2. Environment variables
  3. CLI auth

  #### Parameters

  - `Optional` config: TokenResolverConfig

    Token resolution configuration

  #### Returns Promise<Result<ScmToken, Error>>

  Resolved token or error

  - Defined in packages/nexus-agents/src/scm/token-resolver.ts:96