I am investigating using the services module in Drupal 6 to get data from some custom views in JSON format. I followed an article at http://drupal.org/node/308629 and created a vb version of this project (pushed up to https://sharpred@github.com/sharpred/ConsoleApplicationDrupal.git)
The first time I run my code I get "Invalid API Key", subsequent runs return "token has been used previously for a request. Re-try with another nonce key". The second error is a bit spurious IMO as my code creates a new random nonce each time it is run.
I also noticed that the first run creates an entry in services_timestamp_nonce table that contains just the timestamp but no nonce or domain value. If I delete this record, it goes back to the "invalid api key" message.
The code works unauthenticated and the method call from /admin/build/services/browse/views.get on the site works also.
Any ideas as to why this does not work?
Searching google, the most common source of "invalid api key" seems to be either the timestamp one uses is wrong or the api key does not match the domain used in creating the hash. Neither are true in my case as far as I can see. I created a gist of my code used to create the timestamp and hash at https://gist.github.com/1151222
Can anyone help on getting this process to work?