How should you switch your API connection from staging to production?

If you first connect your staging account to your MageMail account, and then test it out, and then want to deploy to production, here's how you can do that.

Alright so you have your staging account hooked up to your MageMail account, let's just say you're using the demo account.

So, 99% of the time, you don't need a separate MageMail account for staging vs. prod.  If you are the special snowflake 1-percent-er that needs it, just get in touch and we'll set you up.

So all you need to do in order to deploy to prod is - once you've deployed the code to prod, go ahead and Disconnect from MageMail and then reconnect.

That will re-generate API keys as well as the API URL (which will point to prod instead of staging now) and associate them to the MageMail account.

In order to reconnect you'll need to use your MageMail account username and password.

Note: one thing you want to avoid doing is reconnecting to your MageMail account from a staging environment once you're already connected in prod.  That will regenerate API keys and invalidate the prod connection.

Still need help? Contact Us Contact Us