"This nonce has been used already"

Asked by Greg on 2012-07-06

I'm trying to access launchpad via rest according to this document:

https://help.launchpad.net/API/Hacking

and this:

https://help.launchpad.net/API/SigningRequests

I managed to go to step 3 and get the access key, however whatever I do next, I get

401 Unauthorized - This nonce has been used already.

My nonce is made from my consumer key, the time stamp and a random number, like this:

PHPDevShellErrorReporter_1341533857_28328970

so I'm 100% sure it's not been used before.

What am I doing wrong?

TIA

greg

Question information

Language:
English Edit question
Status:
Expired
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
2012-07-11
Last reply:
2012-07-27

This question was reopened

  • 2012-07-10 by Greg
Greg (gregfr) said : #1

I noticed it IS NOT working with this url:

https://api.launchpad.net/1.0/people/+me

but it IS working with this one:

https://api.launchpad.net/1.0/bugs/1021388

William Grant (wgrant) said : #2

Ah. /people/+me redirects, and you're probably following the redirect without resigning.

Greg (gregfr) said : #3

ok, I didn't know I had to resign.

So I have to turn off the "auto follow" feature of the http library, correct? do I need to redo step 3 or can keep the same credentials?

William Grant (wgrant) said : #4

You'll probably need to disable automatic redirect following, indeed. You don't need to repeat step 3, as the access token can be used for arbitrarily many requests until the user revokes it or it expires (if the user told Launchpad that it should expire).

Greg (gregfr) said : #5

OK thanks a lot for your help, let me test that and tell you how it is working.

Greg (gregfr) said : #6

OK it's working. It's probably worth mentionning it in the docs.

Thanks a lot!

Greg (gregfr) said : #7

Thanks William Grant, that solved my question.

Greg (gregfr) said : #8

Well in fact it worked only once :(

Now I'm back to the 401, I don't even receive the 303, I'm lost...

William Grant (wgrant) said : #9

What does your request look like? What is the content of the 401?

Greg (gregfr) said : #10

I cannot say right, I re-opened the page and now it's working again... But basically I got a 401 with the content "You need to be logged in to view this URL.". (of course I tried to restart the whole process to get a new token before posting).
Is it possible to know if we're "logged in" without requiring access to /people/+me?

Launchpad Janitor (janitor) said : #11

This question was expired because it remained in the 'Open' state without activity for the last 15 days.