Question

Missing entitlement info in REST API v1 for subscribers

  • 21 November 2023
  • 1 reply
  • 6 views

Userlevel 1
Badge +2

I have my CURL like so:
```

curl --request GET \

     --url https://api.revenuecat.com/v1/subscribers/$RCAnonymousID:<sandboxId> \

     --header 'accept: application/json' \

     --header 'authorization: Bearer xxxxx [secret, non-public key]

```

In my dashboard I see the sandboxid user and that they have the correct entitlement.

I get this response, missing the entitlement

```

{"request_date":"2023-11-21T15:51:13Z","request_date_ms":1700581873079,"subscriber":{"entitlements":{},"first_seen":"2023-11-21T15:49:30Z","last_seen":"2023-11-21T15:49:30Z","management_url":null,"non_subscriptions":{},"original_app_user_id":"<sandboxid>","original_application_version":null,"original_purchase_date":null,"other_purchases":{},"subscriptions":{}}}

```

This was working for me before. I was able to get the correct entitlement and everything. It seems to have stopped working. Or I did something else wrong.

Any idea what’s going on?


1 reply

Userlevel 3
Badge +6

Hey @Matthew !

 

This looks like somewhere in the logic, the user ID that you are passing in is getting cleared out and it is creating a new user ID that is empty so their are no entitlements for that new user ID but the previous sandbox user will still have their entitlements. 

 

I would make sure that you double check to make sure that you aren't accidentally passing in a null user ID or make sure that you are identifying users correctly so the same app user ID persists throughout the lifecycle of the app! 

Reply