Amazon Selling Partner API (SP-API) SDK for TypeScript
    Preparing search index...

    Class SellingPartnerApiAuth

    Handles Login with Amazon (LWA) OAuth token management for the Selling Partner API.

    Supports both refresh-token and grantless (scope-based) authentication flows. Tokens are cached and automatically refreshed when expired. Concurrent calls to getAccessToken are deduplicated into a single request.

    Index
    • get accessTokenExpiration(): Date | undefined

      Expiration date of the currently cached access token, or undefined if no token has been fetched yet.

      Returns Date | undefined

    • Returns a valid LWA access token, refreshing it if expired.

      Concurrent calls while a refresh is in progress share the same request.

      Returns Promise<string>

      The access token string.