Palbase IAP · API
/iap/apple/grantsGrant an In-App Purchase key's connection
A one-time grant, good for 30 minutes, to hand the project an In-App Purchase key for one of its iOS apps. Whoever asks for it never holds the key: the person opens connect_url in a browser, or a terminal posts the key to POST /iap/apple/connect with the grant. A project holds 10 open grants at most, Stripe's and the App Store's together (429 too_many_grants). A link an environment's token asks for connects a key where the project has none: it replaces no connected key (409 key_exists).
Called by your server, with the project's secret key.
Headers
Idempotency-Keystring · optionalMakes the write safe to send again (at most 255 characters). A retry with the same key and the same request gets the first answer back, marked `Idempotent-Replayed: true`, and changes nothing; the same key with a different request is refused with 422, and while the first request still runs a retry gets 409 with Retry-After. Answers are kept for 24 hours.curl -X POST "https://<your-ref>.palbase.studio/iap/apple/grants" \
-H "apikey: $PALBASE_SECRET_KEY"Responses
201The grant
400The request is malformed, or a field breaks a rule (the error names which)
401No key, not a key of this project, or a token that is not valid (the edge's answer)
403Not the project's secret key (`secret_key_required`)
409A request with this Idempotency-Key is still running (`idempotency_key_in_use`, Retry-After)
413The request body is too large (`request_too_large`)
422The Idempotency-Key was sent with a different request (`idempotency_key_reused`)
429The project has 10 connect links open (`too_many_grants`): use one, or wait for them to expire (Retry-After); or over the project's request limit
503Temporarily unavailable; retrying is safe after Retry-After
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation CreateAppleGrant of iap's contract.