API Returning "ERRORS"

Tagged:

Currently contains 8 posts

Avatar

September 12, 2017 19:20

IBEC

Hello,

We have a query that has been running fine for a couple years now. This morning it stopped working and just returns “ERRORS

I have stripped down the function to it’s simplest:

?php
// Get Session ID
$ch = curl_init();
$optArray = array(
CURLOPT_URL => ‘https://new.pcrecruiter.net/rest/api/access-token?DatabaseId=Banking.SMITHWILKINSON&Username=usernameval&Password=pass&AppId=appidval&ApiKey=apikeyval’,
CURLOPT_RETURNTRANSFER => true
);
curl_setopt_array($ch, $optArray);
$result = curl_exec($ch);
$data = json_decode($result);
$SessionId = $data→SessionId;
$SessionId = rawurlencode($SessionId);
curl_close($ch);

//Get All Placements from API
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => ‘http://new.pcrecruiter.net/rest/api/positions?ResultsPerPage=100&Fields=Status,UserName,DatePosted,PositionId&query=Status%20eq%20Available&SessionId=’.$SessionId
));
$resp = curl_exec($curl);
// Close request to clear up some resources
$data2 = json_decode($resp);
print_r($data2);

json response: {"errors":""}

Are you able to assist?

Thankyou!

Avatar

September 12, 2017 20:00

Wayne-PCRecruiter

I will see if there is a problem with the new.pcrecruiter.net endpoint. You should only ever be using this if you are testing/waiting for a new feature to go live.

The appropriate endpoints for production code would be:

https://www.pcrecruiter.net/rest/api for PCR8 users
https://www2.pcrecruiter.net/rest/api for PCR9 users

Can you please try one of those endpoint and let me know if you are having issues?

Avatar

March 24, 2020 19:41

Jeff.Shay

How can I see my API key so I can verify that the one within Call Logic is accurate? I am now getting API Errors on the site which I never got before.

Avatar

March 24, 2020 19:51

Jarrid-PCRecruiter

It’s on the top menu, next to the forum button, “API Keys”.

https://jarrids.com/images/apikeys.png

Avatar

March 25, 2020 14:49

Jeff.Shay

Are there any API limits? Call Logic says we may have limits on the API key that have been exceeded.

Avatar

March 25, 2020 16:18

Jarrid-PCRecruiter

Hi Jeff,

Yes, the current limits are 5,000 requests/day (free) and 50,000 requests/day (paid). Typically Call Logic uses the free version.

Avatar

March 26, 2020 16:32

Jeff.Shay

Call Logic is saying I am over my limit, but I dont know how I could be over 5000/day.

Avatar

March 26, 2020 16:34

Jarrid-PCRecruiter

Can you email your API keys to jarrid (at) mainsequence (dot) net please?

Reply to thread