upwork-api

Upwork API returns 405/Possibly resource is not shared


I have succesfully authorized and wanted to get my user ID from

https://www.upwork.com/api/api/hr/v2/users/me.json, 

but I get only:

{"server_time":1576149895,"error":{"status":405,"code":405,"message":"Possibly resource is not shared"}}

I tried with a couple of other endpoints, but the response is always the same as above.


Solution

  • you're using a wrong URL - "api" is doubled, must be "https://www.upwork.com/api/hr/v2/users/me.json" instead of "https://www.upwork.com/api/api/hr/v2/users/me.json"