Skip to main content
Solved

Missing attributes after REST API request

  • 30 November 2021
  • 1 reply
  • 138 views

Forum|alt.badge.img+5

At the moment I’m trying to read custom user attributes using the REST API.

https://api.revenuecat.com/v1/subscribers/XXXXXXXXXXXXX'

According to the following link this should be possible:

https://docs.revenuecat.com/docs/subscriber-attributes#reading-attributes

However; after a request I get the following data: without any attributes:

Show content

{
   "request_date":"2021-11-30T09":"16":09Z,
   "request_date_ms":1638263769288,
   "subscriber":{
      "entitlements":{
         "Pro":{
            "expires_date":"2021-12-25T12":"38":30Z,
            "grace_period_expires_date":null,
            "product_identifier":XXXXXXXXXXXX,
            "purchase_date":"2021-11-25T12":"38":30Z
         }
      },
      "first_seen":"2020-11-14T21":"10":39Z,
      "last_seen":"2021-11-29T15":"03":39Z,
      "management_url":null,
      "non_subscriptions":{
         
      },
      "original_app_user_id":XXXXXXXXXXXX,
      "original_application_version":1.0,
      "original_purchase_date":"2013-08-01T07":"00":00Z,
      "other_purchases":{
         
      },
      "subscriptions":{
         “XXXXXXXXXXXX":{
            "billing_issues_detected_at":null,
            "expires_date":"2021-12-25T12":"38":30Z,
            "grace_period_expires_date":null,
            "is_sandbox":false,
            "original_purchase_date":"2021-11-25T12":"38":30Z,
            "period_type":"normal",
            "purchase_date":"2021-11-25T12":"38":30Z,
            "store":"stripe",
            "unsubscribe_detected_at":null
         },
         “XXXXXXXXXXXX":{
            "billing_issues_detected_at":null,
            "expires_date":"2021-12-25T12":"04":12Z,
            "grace_period_expires_date":null,
            "is_sandbox":true,
            "original_purchase_date":"2021-11-25T12":"04":13Z,
            "period_type":"normal",
            "purchase_date":"2021-11-25T12":"04":13Z,
            "store":"stripe",
            "unsubscribe_detected_at":null
         },
         “XXXXXXXXXXXX":{
            "billing_issues_detected_at":null,
            "expires_date":"2020-10-17T14":"27":06Z,
            "grace_period_expires_date":null,
            "is_sandbox":true,
            "original_purchase_date":"2020-10-16T09":"12":19Z,
            "period_type":"normal",
            "purchase_date":"2020-10-17T13":"27":06Z,
            "store":"app_store",
            "unsubscribe_detected_at":null
         },
         “XXXXXXXXXXXX":{
            "billing_issues_detected_at":null,
            "expires_date":"2021-03-24T12":"12":21Z,
            "grace_period_expires_date":null,
            "is_sandbox":true,
            "original_purchase_date":"2020-10-16T09":"12":19Z,
            "period_type":"normal",
            "purchase_date":"2021-03-24T12":"07":21Z,
            "store":"app_store",
            "unsubscribe_detected_at":"2021-03-24T12":"30":13Z
         }
      }
   }
}

 

When opening the users’ account on the dashboard, the attribute does exist. I’ve triple checked I’m loading the right account and the attribute exists.

 

Best answer by Albert-Jan

Solved! There is a different result depending on the key you send your request with. I made my request with a public key instead of a private one.

View original
Did this post help you find an answer to your question?

1 reply

Forum|alt.badge.img+5
  • Author
  • Helper
  • 1 reply
  • Answer
  • November 30, 2021

Solved! There is a different result depending on the key you send your request with. I made my request with a public key instead of a private one.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings