Entitlement with sku does not exist in namespace

Item definition published to store:

Item added as entitlement to user:

Code executed from within Extend service extension using C# SDK:

EntitlementInfo? fetchConsumableEntitlementResponse = _ABProvider.Sdk.Platform.Entitlement.GetUserEntitlementBySkuOp
.Execute(NAMESPACE, userId, “nj_test_reward_token”);

Response:

{“errorCode”:31143,“errorMessage”:“Entitlement with sku [nj_test_reward_token] does not exist in namespace [REDACTED]”,“messageVariables”:{“namespace”:“REDACTED”,“sku”:“nj_test_reward_token”}}

Hi @njupshot, we usually get those errors when we pass the wrong userId when calling the getUserEntitlementBySku endpoint.
Could you please verify that the userId that you passed when you get that error, is the same with the actual userId that owns the entitlement in that namespace? Thanks!

I have verified that the User ID is indeed correct.

What can I provide to help track these issues down? Are there transaction IDs or something in the HTTP response that I could provide that would help correlate logs on AB’s back-end to help troubleshoot?

hi @njupshot , please check the namespace & userId in your request. I think the namespace should be your game namespace.

I am using our game namespace, I used REDACTED above to keep our game namespace out of the public forums.

Hi @njupshot

After check your request payload under your namespace, and we found you pass a user id starts with 713…, but this entitlements you shared in screenshot, it belongs to another user, the user id starts with b8e…,

Could you double confirm that you pass a correct user id?

Thanks

Hi @mercuryw1 I’ve verified that user b8e… is indeed the one with the entitlement, though I looked up that user using the same email tied to user 713… so I’m not sure how both those users could have had the same email address. Either way, explicitly setting the entitlement on user 731… has resolved my issue. Thank you!

1 Like