Skip to content

AxiosError: Request failed with status code 401 #24

@MCKmecik

Description

@MCKmecik

Hi there,

We are still getting the following error:

AxiosError: Request failed with status code 401

when we try to create an A2U payment.

Here is our code:

const pi = new PiNetwork.default(PI_API_KEY, PI_WALLET_PRIVATE_SEED);

const paymentData = {
 amount: 2,
 memo: 'Withdraw',
 uid: '...uid',
 metadata: { u: 0 }
};

await pi.createPayment(paymentData);

The function below is working without any errors:

 const pi = new PiNetwork.default(PI_API_KEY, PI_WALLET_PRIVATE_SEED);
 const incompletePayments = await pi.getIncompleteServerPayments();

Any help would be appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions