Question

Force Sandbox for promotion through API, no SDK?

  • 16 November 2022
  • 3 replies
  • 22 views

Badge +1

Hey all,

Im trying to set up some test/sandbox data but dont seem to be able to make sandbox promotions. At first tried using the customer management portal with the Sandbox Data checked, but that seems to have still made the promotion a production version. And getting the user shows that the subscription generated is_sandbox is false. 

I then tried using the api with a secret token through postman but it still has the subscription set to prod. Is there a header or value that needs to be set to avoid the automagic and force it to pick prod or sandbox?

Edit: Just a little extra info, my use case is a backend dev that is pulling data from RC to confirm active entitlements for access permissions. In our development envs we want to keep at least one user with a lifetime subscription that wont expire so we can test the subscription requirement for auth.


3 replies

Userlevel 4
Badge +8

What you might be doing is granting promotional entitlements, which are not marked as sandbox. The reason for this is that we have no concept of production vs sandbox when it comes to promotional entitlements, so we default to the environment as production.

There's no workaround here, you just need to have good bookkeeping on your end, like remembering that this user is your "sandbox" user and that the promotional entitlement is to be considered as "sandbox".

Badge +1

@Haley Pace Are there ways to make permanent sandbox subscriptions then? I see that in sandbox it reduces the times to like max 30 mins for a year.

Userlevel 4
Badge +8

You can’t make permanent sandbox subscriptions, but as you’ve seen you can make it yearly to get max time before refresh.

Reply