You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm guessing this is an encoding issue, but I haven't been able to correct it as of yet. When using the filtering capabilities documented in the Freshdesk API for searching companies by domain I receive the following error: "Unexpected/invalid field in request"
After some testing I was able to get the following curl request to work from the command line, but I can't reproduce the same result in code.
curl -v -u {API_KEY}:X -X GET 'https://{DOMAIN}.freshdesk.com/api/v2/search/companies?query="domain:%27gmail.com%27"'
The key seems to be encoding the single quotes in the query, but not the double quotes surrounding it, at least from the curl CLI. I tried a number of combinations from the PHP library and can't seem to get it to go through.
I'm guessing this is an encoding issue, but I haven't been able to correct it as of yet. When using the filtering capabilities documented in the Freshdesk API for searching companies by domain I receive the following error: "Unexpected/invalid field in request"
After some testing I was able to get the following curl request to work from the command line, but I can't reproduce the same result in code.
curl -v -u {API_KEY}:X -X GET 'https://{DOMAIN}.freshdesk.com/api/v2/search/companies?query="domain:%27gmail.com%27"'
The key seems to be encoding the single quotes in the query, but not the double quotes surrounding it, at least from the curl CLI. I tried a number of combinations from the PHP library and can't seem to get it to go through.
$arrCompanies = $this->objFreshdesk->companies->all([
'query' => '"domain:'gmail.com'"',
]);
The text was updated successfully, but these errors were encountered: