From ac9d38c64871c47b4da6f5688cbcc612eb3be510 Mon Sep 17 00:00:00 2001 From: "promptless[bot]" <179508745+promptless[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2026 19:31:46 +0000 Subject: [PATCH] Document EU region support and callback URL requirement for JS SDK --- CHANGELOG.md | 2 ++ content/docs/js-sdk/preparing-request.mdx | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d287360..d157abf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ ## 0.1.0 +* Added EU region support documentation for JS SDK - use `https://eu.portal.reclaimprotocol.org` as `customSharePageUrl` to automatically route API requests to the EU backend +* **JS SDK**: When using a regional portal (any `customSharePageUrl` other than `share.reclaimprotocol.org` or `portal.reclaimprotocol.org`), you must now set a callback URL using `setAppCallbackUrl()`. The SDK throws a `CallbackUrlRequiredError` if missing. * Added log event type documentation for inapp sdk and inapp react native sdk diff --git a/content/docs/js-sdk/preparing-request.mdx b/content/docs/js-sdk/preparing-request.mdx index 49f10e4..a8c49d9 100644 --- a/content/docs/js-sdk/preparing-request.mdx +++ b/content/docs/js-sdk/preparing-request.mdx @@ -259,6 +259,27 @@ const proofRequest = await ReclaimProofRequest.init(APP_ID, APP_SECRET, PROVIDER }); ``` +## EU Region Support + +To keep data within EU infrastructure, use the EU portal URL: + +```js +proofRequestOptions = { + ..., //other options, if any + useAppClip: false, + customSharePageUrl: 'https://eu.portal.reclaimprotocol.org' +} +const proofRequest = await ReclaimProofRequest.init(appId, appSecret, providerId, proofRequestOptions); + +// Required: set a callback URL when using regional portals +proofRequest.setAppCallbackUrl('https://yourbackend.com/reclaim-callback'); +``` + +Setting `customSharePageUrl` to the EU portal automatically routes API requests to `https://eu.api.reclaimprotocol.org`. No additional backend configuration needed. + +> [!IMPORTANT] +> When using a regional portal (any `customSharePageUrl` other than `share.reclaimprotocol.org` or `portal.reclaimprotocol.org`), you must set a callback URL using `setAppCallbackUrl()`. The SDK throws a `CallbackUrlRequiredError` if you don't. + ## Using the in-browser SDK In-Browser SDK use is available only for users on a premium enterprise plan. Please [contact support](https://t.me/protocolreclaim) for more details.