isaced / appstore-connect-sdk

A TypeScript module for Node.js that interacts with the App Store Connect API, providing support for all APIs based on OpenAPI specification.
MIT License
25 stars 7 forks source link

Added expiration time returns a 401 #14

Open willroyMyles opened 8 months ago

willroyMyles commented 8 months ago
  const client = new AppStoreConnectAPI({
    issuerId: process.env.SPACESHIP_CONNECT_API_ISSUER_ID,
    privateKeyId: process.env.SPACESHIP_CONNECT_API_KEY_ID,
    privateKey: process.env.SPACESHIP_CONNECT_API_KEY,
    expirationTime: 600
  });

the above returns the following error

response: _Response [Response] {
    [Symbol(realm)]: null,
    [Symbol(state)]: {
      aborted: false,
      rangeRequested: false,
      timingAllowPassed: true,
      requestIncludesCredentials: true,
      type: 'default',
      status: 401,
      timingInfo: [Object],
      cacheState: '',
      statusText: 'Unauthorized',
      headersList: [_HeadersList],
      urlList: [Array],
      body: [Object]
    },
    [Symbol(headers)]: _HeadersList {
      cookies: null,
      [Symbol(headers map)]: [Map],
      [Symbol(headers map sorted)]: null
    }