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.

Google script OAuthConfig

I'm needing to get a list of odesk memos into a google sheet, I wondere if someone here has done something similar. I have tried to use OAuthConfig utility from google script, but it doesn't seem to work.

Appreciate your advice.

Regards.

Here is the code I'm using and getting oAuth error.

var oAuthConfig = UrlFetchApp.addOAuthService("odeskapi");
oAuthConfig.setAccessTokenUrl("https://www.odesk.com/api/auth/v1/oauth/token/access");
oAuthConfig.setRequestTokenUrl("https://www.odesk.com/api/auth/v1/oauth/token/request");
oAuthConfig.setAuthorizationUrl("https://www.odesk.com/services/api/auth");
oAuthConfig.setConsumerKey("*****");
oAuthConfig.setConsumerSecret("****");

var options =
{
"method": "GET",
"oAuthServiceName" : "odeskapi",
"oAuthUseToken" : "always"
};

var result = UrlFetchApp.fetch("https://www.odesk.com/api/hr/v2/userroles.json",options );

Vote Result

----------
Score: 0.0, Votes: 0
Hi Gerardo, Did you solve

Hi Gerardo,

Did you solve this problem? I've been using oDesk API for long time but now I need authorization to get some data but I couldn't figure it out too. Your help would be very useful if you know something.

Sincerely,

Max Trukhanovich.

Hello Maxim, please, check

Hello Maxim,

please, check the documentation for using OAuth with oDesk API. It is available at developers site - developers.odesk.com/Authentication-using-OAuth.

Thanks for the advice! I have

Thanks for the advice! I have already checked but there is nothing about JS.

"The list of oauth-libraries

"The list of oauth-libraries for different languages can be found at http://oauth.net/code/". Please, try visit that page, and check what libraries they provide.