What you need
- The claim’s transaction id:
claim.transactionIdfrom the placement result in your app. Send it to your server when the user claims. It is null when Encore could not record the claim, and then there is nothing to look up. - If your app calls
identify(), the user id you pass to it. It’s optional: leave it out when your app never callsidentify()and the SDK makes the id itself, and for claims made beforeidentify(), which keep the pre-identify owner. - Your project’s publishable key and its paired secret key, from the dashboard. Call this endpoint only from your server. It never accepts a publishable key on its own.
Request
Leaving out
userId skips the check that the claim is that user’s. The claim still has to be in your project, but making sure the link reaches the right person is then up to you: send it only to the user you stored the transaction id with.Authentication
The request is HMAC-signed. Send these headers:
The base string is
timestamp.METHOD.path.query. Two details cause most signature failures:
- Sign the path without
/encore. You call/encore/publisher/sdk/v1/..., but Encore’s gateway strips/encorebefore the API checks the signature, so sign/publisher/sdk/v1/transactions/{transactionId}/claim-url. - Sign the query string, not a body. With
userId, that’suserId=followed by the URI-encoded user id. Without it, the query is empty and the base string ends in a dot:timestamp.GET.path.
Response
claimUrl is not null. Read it as the only signal: any linkType value means it is a link you can send. Encore may add values to linkType, reason and status, so treat a reason you do not recognize as “no link”, and a status you do not recognize as closed.
advertiser links are the brand’s own link, and Encore sets no expiry on them. They keep crediting the claim for as long as the brand’s network attributes it, often around 30 days. Send it within days of the claim, not weeks later.
When there is no link
Test keys
A test key (pk_test_* with its secret) reads only claims made in a development environment: with a test key, or from a debug build. It gets 404 for every live user’s claim. Claims made from a debug build on a live key also read with isTestRequest: true, and their links are real, so test your email flow with your own account.
Status codes
Related
placement()result, whereclaim.transactionIdcomes from in your app: iOS, Android, React Native, Flutter.