Question

Nodejs REST API for deleting subscribers doesn't work correctly

  • 12 August 2022
  • 5 replies
  • 283 views

Userlevel 1
Badge +1

verbatim copy of code from the documentation:

 

const sdk = require('api')('@revenuecat/v4.0#1yz2c0m2sl5v5md8q');

sdk.auth('Bearer REVENUECAT_API_KEY');
sdk.deleteSubscriber({app_user_id: 'app_user_id'})
.then(res => console.log(res))
.catch(err => console.error(err));

produces this error:

Error: Sorry, `deleteSubscriber` does not appear to be a valid operation on this API.    at Proxy.<anonymous> (/workspace/node_modules/api/src/index.js:164:21)    at processTicksAndRejections (node:internal/process/task_queues:96:5) 

 


5 replies

Badge +4

I’m getting the same error, with subscribers:

Error: Sorry, `subscribers` does not appear to be a valid operation on this API.


Could it be something with the OpenAPI spec?

Badge +3

I’m also experiencing this issue with NodeJS. Anybody know what the issue is?

Badge +2

Hi, I have the same Issue with the receipts function. Does anybody has a solution for it???

 

const sdk = require('api')('@revenuecat/v4.0#1uypz42l7uldb2n');

sdk.auth('Bearer <API_KEY>');

sdk.receipts({

    product_id: productId,

    app_user_id: appUserId,

    fetch_token: fetchToken

}, {'x-platform': 'android'})

  .then(({ data }) => console.log(data))

  .catch(err => console.error(err));

Badge

 

Badge +2

This workaround has stopped working altogether for me in the last 24 hours. Can anyone else confirm?

EDIT: Updating spec to latest version fixed it: https://docs-origin.revenuecat.com/openapi/6421b235414b45007a0bd1a2

 

 

Reply