Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6349821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:41:28+00:00 2026-05-24T21:41:28+00:00

I am investigating using the services module in Drupal 6 to get data from

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:41:28+00:00Added an answer on May 24, 2026 at 9:41 pm

    I figured this out after trawling through the code for the services module. Some of the values in my multipart form were not enclosed with quotes, so were being processed as nulls by the services_key_auth module. This meant that on the first pass, only the timestamp was being written to the nonce table and the computed hash did not match my hash because of the quotes. On subsequent updates, the module was effectively doing a search for a nonce value of null and on finding one in the database, returning the result that one had been used before. If anyone else gets this issue, pull my github project linked above and look at my code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I come from a CVS background. I'm currently investigating using SVN for a project.
I'm investigating ways of using GPU in order to process streaming data. I had
We're investigating using RIA Services (July 09 Preview) to expose parts of an existing
I'm using JQuery to make a JSON request to access data on a private
I'm investigating moving away from an Oracle connection pool and using the Tomcat connection
I have been trying to connect to some web services using WCF but I
I am investigating using JPA for my Data Access code. I am trying to
We are investigating using CruiseControl.NET as both a Continues Integration build provider, as well
I'm investigating using MSMQ for my team's new project but I need to know
I'm investigating using hosted subversion for a new project at work and was wondering

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.