Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the MailChimp source from API - Generic

I can't find the answer to this anywhere, if it's even possible.

I've got a PHP script to connect a few web forms to MailChimp using their v3.0 API. Currently, when the form is used, under the 'Source' column next to the new record it says: "API - Generic".

Is there a way to change this, so I can make it say something else?

Cheers, Lloyd

like image 467
Lloyd England Avatar asked Sep 09 '26 16:09

Lloyd England


1 Answers

The only way to control the "Source" listed in MailChimp's Contact table, profiles, and segmentation, is to use a key provided by using their "Registered app" option.

Setup found in account at:

  1. Login
  2. Drop-down top right
  3. Select "Account"
  4. on the "Extras" drop-down select "Registered Apps"
  5. Register an App button.
  6. Name it what you want source to be.
  7. Use below PHP oauth flow to get API key unique to this app and use it in your script.
  8. Done

If this is done the "Source" will display as the name you provide when establishing the app.

This process essentially hands you back an API key after Oauth so beyond making used of that key in your script no other code changes should be required

Link to their API docs with a bit more info:

  • https://developer.mailchimp.com/documentation/mailchimp/guides/how-to-use-oauth2/

Sample PHP app that will return the API key for your registered app:

  • https://github.com/mailchimp/OAuth2-sample-apps (super old but still works)
like image 194
Stu Avatar answered Sep 13 '26 21:09

Stu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!