Back to » Love the way you work.

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

Problem with message center API

hello. I am using some example code trying to learn how to manage and send messages using the token authentication system. Here is my code trying to send a simple message:

and here is the error I'm getting:

PHP Fatal error: Uncaught exception 'Exception' with message 'API return code - 400. Can not create GET request.' in /home/kray/Webs/odesk/oDeskAPI.lib.php:204
Stack trace:
#0 /home/kray/Webs/odesk/oDeskAPI.lib.php(133): oDeskAPI::request('get', 'https://www.ode...', Array)
#1 /home/kray/Webs/odesk/example_lib_nonweb.php(44): oDeskAPI->get_request('https://www.ode...', Array)
#2 {main}
thrown in /home/kray/Webs/odesk/oDeskAPI.lib.php on line 204

Vote Result

Score: 1.0, Votes: 1
Hello Lora, errors in code: -

Hello Lora,

errors in code:
- you're running GET request which means "List thread details based on thread id"
- your request url is invalid, read more here - you don't need company id in the url, instead userid and thread_id are required
- check your response at first, I suppose it has smth like "No thread ID found" in node "message"

please fix errors and try again, hope it helps you

The same problem here, I have

The same problem here, I have check the url. still shwing the same error.