Problem requesting access token

98 views
Skip to first unread message

aur0n

unread,
Sep 28, 2011, 9:49:15 AM9/28/11
to glue-development
Hello there,
I've recently trying to use GetGlue's API. I'm stuck with the first
authentication: with basic requests (friends list, profile info, etc),
everything works fine. With actions, on the other hand, I get as
response a 401 Unauthorized.

I'm using signpost library (http://code.google.com/p/oauth-signpost/)
and this is the code: http://pastebin.com/u8WZGbve

Any suggetions would be really appreciated.

Thanks for your time.

Karen Teng (GetGlue)

unread,
Sep 28, 2011, 10:29:41 AM9/28/11
to glue-dev...@googlegroups.com
Hi there,

It could be that we are not recognizing what object maps to 

If you pass in something else into objectId, like objectId=tv_shows/true_blood, does that work? 

- Karen

--
You received this message because you are subscribed to the Google Groups "glue-development" group.
To post to this group, send email to glue-dev...@googlegroups.com.
To unsubscribe from this group, send email to glue-developme...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/glue-development?hl=en.




--
Karen Teng
VP of Engineering
http://getglue.com

GetGlue:  
http://getglue.com/TengFactor
LinkedIn: 
http://www.linkedin.com/in/karenteng

We are hiring! http://getglue.com/jobs



aur0n

unread,
Sep 28, 2011, 10:55:25 AM9/28/11
to glue-development
Hi Karen,
thanks for your fast reply.

I changed the URL to "http://api.getglue.com/v2/user/addLike?
objectId=objectId=tv_shows/true_blood" but nothing changes. The
library returns me "ERROR:
oauth.signpost.exception.OAuthCommunicationException: Communication
with the service provider failed: Server returned HTTP response code:
401 for URL: http://api.getglue.com/oauth/access_token"

This problem is driving me crazy. :S

On Sep 28, 4:29 pm, "Karen Teng (GetGlue)" <ka...@getglue.com> wrote:
> Hi there,
>
> It could be that we are not recognizing what object maps tohttp://www.amazon.com/dp/B001P9KR8U/
>
> If you pass in something else into objectId, like
> objectId=tv_shows/true_blood, does that work?
>
> - Karen
>
>
>
>
>
>
>
>
>
> On Wed, Sep 28, 2011 at 9:49 AM, aur0n <fondam...@gmail.com> wrote:
> > Hello there,
> > I've recently trying to use GetGlue's API. I'm stuck with the first
> > authentication: with basic requests (friends list, profile info, etc),
> > everything works fine. With actions, on the other hand, I get as
> > response a 401 Unauthorized.
>
> > I'm using signpost library (http://code.google.com/p/oauth-signpost/)
> > and this is the code:http://pastebin.com/u8WZGbve
>
> > Any suggetions would be really appreciated.
>
> > Thanks for your time.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "glue-development" group.
> > To post to this group, send email to glue-dev...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > glue-developme...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/glue-development?hl=en.
>
> --
> Karen Teng
> VP of Engineeringhttp://getglue.com
> We are hiring!http://getglue.com/<http://getglue.com/about>jobs

Karen Teng (GetGlue)

unread,
Sep 28, 2011, 11:14:04 AM9/28/11
to glue-dev...@googlegroups.com
Seems like there's an extra objectId in your url. It should be

http://api.getglue.com/v2/user/addLike?objectId=tv_shows/true_blood&{other params}

Are you signing the request with the access token of the user?

We are hiring! http://getglue.com/jobs



aur0n

unread,
Sep 28, 2011, 11:19:53 AM9/28/11
to glue-development
Thanks, didn't notice the double objectId. :S

The problem persists, and, honestly, I'm not sure how to sign che
access token. All I know is that with

provider.retrieveRequestToken(consumer, OAuth.OUT_OF_BAND);
(see the pastebin link above for the whole code)

it gains the primary authorization, so I guessed that

provider.retrieveAccessToken(consumer, OAuth.OUT_OF_BAND);

would do the same job for the secondary authorization... damn. :(

melban

unread,
Oct 27, 2011, 7:20:05 AM10/27/11
to glue-development
I found two issues yesterday that might be effecting you also. When I
tried to do my authentication the Request, Authorization and Access
URL's had to be "http". When I used the listed URLs and their "https"
protocol it did not work I got a 403 error. When I changed it started
sending the requests just fine.

I also found an issue where I don't have a callback URL defined in the
GetGlue API system. I instead have to pass a callback in the URL.
GetGlue is not honoring this URL and instead is not sending the token
back to my callback URL.

Hope that helps.
Reply all
Reply to author
Forward
0 new messages