0

I have implemented on Add contact to AgileCRM with PHP API then

In agile_curl_wrap function, I have provided three requirements with Domain, User and Api_key after clicking submit, I got 401 UNAUTHORIZE response back.

I'm sure that I have set all requirement needed with this API. I really got stuck in this step.

Thank in advance for any helps.

Mark Amery
  • 143,130
  • 81
  • 406
  • 459

2 Answers2

0

You can check that gist I've created to show you how it works. Just replace the strings on both files and go on!

In AgileCRM PHP Wrap replace:

define("AGILE_DOMAIN", "yourDomain");
define("AGILE_USER_EMAIL", "yourEmail");
define("AGILE_REST_API_KEY", "yourApiKey");

In AgileCRM PHP Wrap usage replace:

$email = "some@email.com";

And it must work!

Tiago Gouvêa
  • 15,036
  • 4
  • 75
  • 81
0

I have faced the same issue "401 UNAUTHORIZE". Fixed it by changing AGILE_USER_EMAIL

Please provide your valid admin email of your Agile email id at AGILE_USER_EMAIL area and make sure you have added valid AGILE_DOMAIN and AGILE_REST_API_KEY

Muthu17
  • 1,481
  • 12
  • 20