I used the API explorer to create a target url, but I cannot send a GET request with curl. The error is: "Failed to authenticate key".
Here are the steps I am following:
- Create an url in the API explorer:
Looked up the site key in civicrm.settings.php (under
Used the "API Key" extention to add an API key to the "admin" contact (the one that is associated with the civicrm admin account).
I inserted my keys (which I change here for security reasons) to produce this expanded url:
curlthis url, and get the mentioned error
Can anybody help?
I was able to stick a debug log statement into the
authenticateKey function of
CRM_Core_Error::debug_var("req", $_REQUEST); CRM_Core_Error::debug_var("req size", sizeof($_REQUEST));
The result of this is:
Mar 21 11:49:21 [info] $req = Array ( [entity] => Contact ) Mar 21 11:49:21 [info] $req size = 1
So it seems only the first key/val pair of the request is received in _REQUEST. How can this happen?