1

one question about Mautic, i want to use Mautic API to download data automatically. From the manual, i have made a program by PHP to connect Mautic API and callback to localhost. The code does work and it connects to Mautic API correctly. but how can i get access token which is included in callback URL.I need to receive the access token data for my next step.

my php code:

$settings = array(
'baseUrl'          => 'http://54.249.127.11',// Base URL of the Mautic instance
'version'          => 'OAuth1a', // i selected OAuth1a.
'clientKey'        => '199y8rmdeh6sck8g8o4okXXXXXXXX',//Consumer key from Mautic
'clientSecret'     => '5705dvzynzksww4g8s4o0XXXXXXXX',//Client/Consumer secret key from Mautic
'callback'         => 'http://127.0.0.1'// localhost as my Callback URI);
potatout
  • 187
  • 1
  • 11

1 Answers1

1

https://www.mautic.org/blog/developer/how-to-use-the-mautic-rest-api/

This link should fully answer your question. If you disagree you need to more clearly explain what you are confused about.

You may also want to read this: What exactly is OAuth (Open Authorization)?

Hannes Landeholm
  • 1,525
  • 2
  • 17
  • 32
  • hi @Hannes Landeholm Thank you for your comment. i have read this blog and i found it is very easy to understand. what i am confused is that after successful connection, the Mautic (Oauth provider) will give access token to the callback URL. how to get the access token and save the access token to my localhost? – potatout Jul 13 '17 at 00:35
  • AFAIK, you need to provide an URL that Mautic can send a HTTP request to. This means that you cannot provide localhost, you need to give them a real URL on the internet they can access. – Hannes Landeholm Jul 13 '17 at 22:13