Amazon Associate Secret Key


Hi, I have been using Amazon affiliate links through Stripe. Now I needed my secret API key for a new plugin. As I made a mistake and haven't saved it anywhere I deleted one and made a new secret key for it. Now I see total dive in my revenue and clicks. I guess I used my secret API I deleted somewhere else, but have no idea where, or how to check it! I use WordPress for my website if thats important.

asked 9 months ago331 views
1 Answer

Here are a few tips that may help you find where else you might have used the old Amazon affiliate secret API key that you deleted:

  1. Check your WordPress theme files and plugin code for any instances of your affiliate links or API key. Sometimes they can be hardcoded into the code.
  2. Search your database tables directly for references to the old API key. It may show up in wp_postmeta, wp_options etc.
  3. Use a site-wide text search tool like grep or SilverSearcher to scan all files on your server for the API key string.
  4. Review your build or deployment tools in case the key got embedded there. For example, check CI/CD configs, Dockerfiles, NPM scripts etc.
  5. Go through plugins one-by-one and check their config/settings for affiliate links. Especially marketing, SEO and related plugins.
  6. If you use caching like Varnish, clear the cache and check the raw cached requests for signs of the old API key.
  7. Contact Stripe support and see if they can look up if the old key is still being used somewhere. They may be able to identify it.
  8. As a last resort, you can generate a brand new API key, update all links & integrations, and invalidate the lost key via Stripe.

Hopefully scanning systematically through your site's code and tools will uncover where the old key is still active. Let me know if you have any other questions!

answered 9 months ago
  • Jose, I am so thankful for such a thorough answer, but, I have to be honest, and say - I don't have an idea how to do that!! I did go through plugins and themes, but I just couldn't find it.

    Is there a simpler way to check my whole site? Btw, I don't even know what the old secret key was, so don't know what to look for. Oh boy, I totally messed this up.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions