Forum Discussion
ward1992
3 years agoHonored Guest
User Id used for IAP S2S REST Requests
Hi Support, For IAP S2S requests in this doc: https://developer.oculus.com/documentation/native/ps-iap-s2s/ 1. Verify Item OwnerShip: there is no user id in the request, is this intended? i...
msanatan
3 years agoExplorer
OK, figured it out... No idea why the docs don't have it for all requests https://developer.oculus.com/documentation/unity/ps-iap-s2s/ but the key is using the `user_id` parameter. It's only used in the "Retrieve Items Owned" example...
Here's how I verify and consume purchases in Python using the requests library:
def verify_oculus_in_app_purchase(meta_user_id: str, sku: str):
return requests.post(
f'https://graph.oculus.com/{app_id}/verify_entitlement',
data={'sku': sku, 'access_token': access_token, 'user_id': meta_user_id}
).json()
def consume_oculus_in_app_purchase(meta_user_id: str, sku: str) -> bool:
return requests.post(
f'https://graph.oculus.com/{app_id}/consume_entitlement',
data={'sku': sku, 'access_token': access_token, 'user_id': meta_user_id}
).json()
Good luck with your projects everyone!
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 months ago
- 6 months ago
- 7 months ago
- 3 years ago