PaddleHQ / paddle-node-sdk

Node.js SDK for working with the Paddle API in server-side apps.
https://developer.paddle.com/
Apache License 2.0
42 stars 6 forks source link

[Bug]: Issue with Authentication Header Format When Using paddle-node-sdk #16

Closed exinnocommon closed 6 months ago

exinnocommon commented 6 months ago

What happened?

I attempted to retrieve customer information using an email address in the sandbox environment, but I am unable to fetch the data. The initial request was successful, but when I try to execute .next() to fetch more data, I encounter the following error message.

'Error: Authentication header included, but incorrectly formatted\n'

[Edit]: Removed screenshot as it contained client token

Steps to reproduce

export class PaymentServer { paddle = new Paddle(process.env.GIZ_PADDLE_CLIENT_TOKEN, { environment: Environment.sandbox });

async getCustomer() { const customerCollection = this.paddle.customers.list({ email: [authService.user.email] });

let customer;
do {
  customer = await customerCollection.next();
} while (customer.data.length > 0);

} }

What did you expect to happen?

No response

Logs

No response

exinnocommon commented 6 months ago

My apologies. The mistake occurred because I confused the client key with the API key