Key takeaways
- All three keys are in the Integration tab of your app, under 2. Keys and security, with Replace your keys at the bottom.
- The old key stops working right away, so have the new one ready to deploy on your server before you click.
- Keep the hash check on. Without it, anyone who knows or guesses a user ID can open that user's offerwall, including My offers.
How do I rotate my keys and link hash salt?
Go to Apps, click Manage, and open the Integration tab. Under 2. Keys and security, use Replace your keys and click New link hash salt, New postback secret key, or New API key, then confirm. The old one stops working right away, so put the new value on your server at once.
Once your publisher application is approved, every app you create is live right away and has its Integration tab. Each app has its own three keys, so rotating the keys of one app never affects your other apps.
Which key does what
| Key | What it signs or unlocks | Where your server uses it | What fails after a rotation until you update |
|---|---|---|---|
| Link hash salt | The {HASH} in every offerwall link, so nobody can open the wall as another user | The code that builds offerwall links, iframes, and the floating button | Users get the Link not valid page |
| Postback secret key | The {hash} in every postback we send you | Your postback handler | Your hash check rejects real postbacks |
| API key | Sent as Authorization: Bearer | Calls to the Offers API, the Reporting API, and SDK sessions | Those API calls are refused |
These keys belong on your server only. Never put them in a browser or an app. Click Show to see a key and Copy to copy it. The Integration tab has a switch at the top, How will you show the offers?, with Offerwall, Offers API, and Mobile SDK. The link hash salt and Link security show under Offerwall, and the API key under Offers API and Mobile SDK. If you cannot find a key, switch the view.
When to rotate a key
HMAC keys are meant to change from time to time. RFC 2104, the standard that defines HMAC, calls periodic key refreshment a fundamental security practice. The OWASP Secrets Management Cheat Sheet adds that regular rotation means stolen credentials only work for a short time, and that an exposed secret should be revoked, replaced, and removed from wherever it leaked. Rotate:
- Right away if a key was pasted in a public repository, a support chat, a screenshot, a client-side bundle, or a log file.
- When someone with access leaves, such as a developer or an agency.
- After a security notification you did not expect, or any sign your account was accessed by someone else.
- On a schedule you choose, for example once or twice a year, in a quiet hour.
If you keep code on GitHub, GitHub’s secret scanning docs describe how it finds hardcoded keys in your history and why you should rotate a leaked credential immediately: deleting the commit is not enough, because the old value stays in the history. How to keep your app secret safe covers storing keys so they do not leak in the first place.
Step by step: replace a key
- In the sidebar under Publish, click Apps, then Manage next to the app.
- Open the Integration tab. A live app opens on this tab.
- Scroll to 2. Keys and security and find the box Replace your keys: “Use this if a key may have leaked. The old one stops working right away.”
- Click the button for the key you want to replace:
- New link hash salt: “Offerwall links made with the current salt stop working until you update your site.”
- New postback secret key: “Your postback checks fail until you update the key on your server.”
- New API key: “Offers API and Reporting API calls with the current key fail until you update it on your server.”
- Read the question in the window that opens, and confirm.
- The page reloads with a message such as “New link hash salt created. Update it where your server builds offerwall links.” Click Show and Copy next to the new key, and put it on your server.
Every change also creates a security notification under the bell, such as Link hash salt changed, Postback secret key changed, or API key changed. If you did not make the change, secure your account at once with Secure your Moonetix account and What to do if your account is compromised.
A safe rollout order
Because the old key stops working the moment you confirm, the gap between the click and your deploy is the time users or postbacks can fail. Keep it short:
- Prepare the deploy. Make the key a single environment variable or config value, so changing it is one edit, not a code search.
- Rotate one key at a time. If something breaks, you know which key caused it.
- Click, copy, deploy. Replace the key in the dashboard, paste the new value, and restart or reload your app so it reads the new value. Remember config caches, such as Laravel’s
config:cache. - Test. Use Check a link for a new salt, Send a test postback for a new secret key, or one API call for a new API key.
- Catch up. Resend postbacks that failed in the gap.
Tip: rotate in a quiet hour
Pick the hour with the fewest offer completions in your reports. Fewer users open the wall then, and fewer postbacks can fail before your deploy is out. How to test your app lists every check in Integration status.
What to update on your server
- After a new link hash salt: update the code that builds offerwall links. Until then, users get the Link not valid page. Links built with the old salt, for example in emails you already sent, stop working too. Use Check a link in Integration status, at the top of the same tab, to check your new links. If the link still fails, the checker lists an old salt among the most common causes: your server is still on the previous value.
- After a new postback secret key: update the key in your postback handler. Until then, the hash check on your server fails. Postbacks that failed in the meantime can be sent again with Resend in Reports > Postbacks, and a resent postback is signed with the new key. See How to resend a failed postback.
- After a new API key: update it everywhere your server calls the Offers API, the Reporting API, or creates SDK sessions. A dashboard script or a spreadsheet that pulls reports needs the new key as well; Reporting API quick start shows where it goes.
Do not mix up the salt and the secret key
The link hash salt signs offerwall links, and the postback secret key verifies postbacks. Using one in place of the other is the most common cause of Link not valid pages and rejected postbacks after a rotation.
The Link security setting
Above the link hash salt, Link security controls the hash check:
- On (recommended): every offerwall link must carry a valid
{HASH}, so nobody can open the offerwall of another user by changing the user ID. The button reads Turn off the hash check. - Off: a Hash check is off badge appears, and links work without a
{HASH}. Anyone who knows or guesses a user ID can open that user’s offerwall, including My offers. The link hash salt is marked Not in use, and New link hash salt is grayed out. Click Require the hash to turn the check back on.
Turning the check off asks you to confirm first. While it is off, the link and code shown in the Integration tab have no hash. Turn the check on before you go live. When you turn it on, every link needs a valid hash again, so make sure your server adds it first. More on why it matters: Postback security.
On a phone
Tap Apps in the bottom tab bar, then Manage. The app opens on Integration. If you are on another tab, swipe the row of tabs sideways to find it.
Two free tools help while you test: the offerwall link builder shows the link your server should build, and the postback hash checker verifies the postbacks you receive.
Think a key leaked?
Every Moonetix app has its own link hash salt, postback secret key, and API key, and you can replace each one yourself in seconds. Replace it first, then click Chat with us under Need help? in the dashboard with your App ID. How to contact Moonetix support explains what to include.
Frequently asked questions
Does rotating a key change my App ID?
No. The App ID stays the same. Only the key you replaced changes.
Can I undo a rotation?
No. The old key stops working right away and cannot be brought back. Put the new key on your server.
Is there a grace period where both the old and new key work?
No. The switch is immediate, which is why you should have your deploy ready before you click.
Is the postback secret key the same as the link hash salt?
No. The salt signs offerwall links, and the secret key signs postbacks. A common mistake is to use one in place of the other.
Why can I not click New link hash salt?
The hash check is off, so the salt is not in use. Turn on Require the hash first.
Do I lose postbacks while I update the secret key?
No reward is lost. Postbacks that your server rejected in the gap stay in Reports, Postbacks as Not delivered, and you can send them again with Resend once the new key is live.


