Back to oDesk.com » Love the way you work.

Welcome to the oDesk Community! Connect here with fellow clients, contractors, and oDesk staff. Please review our Usage Policy.

Issue in posting a job

Hi,

I am trying to post a job through a test code (file attatched).

I am getting this error.

Fatal error: Uncaught exception 'Exception' with message 'API return code - 403. Can not create GET request.' in C:\xampp\htdocs\odeskTest\oDeskAPI.lib.php:212 Stack trace: #0 C:\xampp\htdocs\odeskTest\oDeskAPI.lib.php(133): oDeskAPI::request('get', 'https://www.ode...', Array) #1 C:\xampp\htdocs\odeskTest\postJob.php(49): oDeskAPI->get_request('https://www.ode...', Array) #2 {main} thrown in C:\xampp\htdocs\odeskTest\oDeskAPI.lib.php on line 212

Vote Result

++++++++++
Score: 10.0, Votes: 1
hello Kumar, according to

hello Kumar,

according to Post a Job API you must use POST request in your application, instead of GET

Please, fix it and try again, also note that you should be authenticated and auth-ed user must have permissions to post a job.

On changing it to post

On changing it to post request, now it's showing this error.

Fatal error: Uncaught exception 'Exception' with message 'API return code - 403. Can not create POST request

As i can post jobs through the odesk interface, so i have permission to post the job.

Kumar, please, verify your

Kumar,

please, verify your app key and secret, check app workflow if it doesn't help feel free to contact support team. Your privat data can't be checked and shared in community.

I have the same

I have the same problem.checked api key and secret key but can't resolve this.any idea?

hi Tamanna, a detailed reply

hi Tamanna,

a detailed reply was given in the proper support ticket, based on the data you provided.
In summary - the issue is connected with wrong usage of the library, the library must be used with a key that requires APIKeys authentication, instead of using a key for OAuth.