404 on access_token request

24 views
Skip to first unread message

Kirsten Jones

unread,
Dec 28, 2011, 9:44:27 AM12/28/11
to Digg API Developers Support
First, it'd be great if there were a better idea of where one could
get support. I sent a tweet to @diggapi, who told me to send them an
email and sent me to the contact page, where I sent a question and
they said to come here.

I'm quite familiar with OAuth, support the LinkedIn OAuth
implementation, and have code that works for several OAuth providers.
So let's assume that my secret/token/signature is ok (which would give
a 401 anyhow, not a 404)

I am, however, getting a 404 response from the access token URL which
is documented here:
http://developers.digg.com/oauth-access-token

I attempted both POST:
http://services.digg.com/oauth/access_token

Host: services.digg.com
accept-encoding: gzip, deflate
content-type: application/x-www-form-urlencoded
Content-Length: 296
user-agent: Python-httplib2/0.7.0 (gzip)

oauth_nonce=340977
oauth_timestamp=1325083168
oauth_signature_method=HMAC-SHA1
oauth_consumer_key=xxx
oauth_verifier=32820975
oauth_version=1.0
oauth_token=xxx
oauth_signature=WcTDWfkiOQzgQWNFhYhBEo75Olw%3D

and GET:
http://services.digg.com/oauth/access_token?oauth_body_hash=2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D&oauth_nonce=62272139&oauth_timestamp=1325083144&oauth_signature_method=HMAC-SHA1&oauth_consumer_key=xxx&oauth_verifier=29304141&oauth_version=1.0&oauth_token=xxx&oauth_signature=agGXohwtCr9NpdsoO57DyGOFZCU%3D

So, what's the issue here? I'm suspecting the URL is actually wrong
in the documentation. But I can't find any actual current code
samples getting an access token.

I'd rather not put my key here, but I have no email address to send it
to.

Dave Beckett

unread,
Dec 28, 2011, 6:14:39 PM12/28/11
to Digg API Developers Support
On Dec 28, 6:44 am, Kirsten Jones <syne...@gmail.com> wrote:
> First, it'd be great if there were a better idea of where one could
> get support.  I sent a tweet to @diggapi, who told me to send them an
> email and sent me to the contact page, where I sent a question and
> they said to come here.

Sorry, we're mostly on vacation until January. Will look into what's
wrong with the forms but otherwise 140 chars is not long enough to
debug more complex things like oauth since you need to send request /
response dumps.

> I'm quite familiar with OAuth, support the LinkedIn OAuth
> implementation, and have code that works for several OAuth providers.
> So let's assume that my secret/token/signature is ok (which would give
> a 401 anyhow, not a 404)

There is some of variety. Ours is OAuth 1.0 as described at
http://developers.digg.com/authentication

> I am, however, getting a 404 response from the access token URL which
> is documented here:http://developers.digg.com/oauth-access-token

As I said in a tweet, the only way that request will return a 404 is
if your application key (aka consumer key) is unknown (invalid) or
missing from the request.

> I attempted both POST:http://services.digg.com/oauth/access_token
>
> Host: services.digg.com
> accept-encoding: gzip, deflate
> content-type: application/x-www-form-urlencoded
> Content-Length: 296
> user-agent: Python-httplib2/0.7.0 (gzip)
>
> oauth_nonce=340977
> oauth_timestamp=1325083168
> oauth_signature_method=HMAC-SHA1
> oauth_consumer_key=xxx
> oauth_verifier=32820975
> oauth_version=1.0
> oauth_token=xxx
> oauth_signature=WcTDWfkiOQzgQWNFhYhBEo75Olw%3D
>
> and GET:http://services.digg.com/oauth/access_token?oauth_body_hash=2jmj7l5rS...

I don't know what oauth_body_hash is but it's not part of OAuth 1

I'm not sure what the code will do with unknown oauth parameters.

> So, what's the issue here?  I'm suspecting the URL is actually wrong
> in the documentation.  But I can't find any actual current code
> samples getting an access token.
>
> I'd rather not put my key here, but I have no email address to send it
> to.

Here's the code I used to test it works

https://gist.github.com/1530346

Dave

Kirsten Jones

unread,
Dec 28, 2011, 6:41:52 PM12/28/11
to digga...@googlegroups.com
Thanks for the help, I'll fiddle with the request and see if I can get it to behave.

Note the contact form worked fine, I just got an "ask in the forums" response, which was frustrating since you'd said to go there.

I get the closed until January thing, linkedin is as well, but I'm hoping to add digg to my demo app here:

http://falling-summer-4605.herokuapp.com/

Before twilio's contest ends Friday :-)

Thanks!
Kirsten

Reply all
Reply to author
Forward
0 new messages