What is the "sig=" value in the Spock API. It doesn't appear to be documented in the API docs.
There is a sig= value in the API call but it does not appear to be documented. How do you determine that value?
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?The sig value is only used in the example API call. You don't need to include it when you use the API.
-
Inappropriate?Thanks for the help. I am obviously still doing something wrong. Here is the output from curl
curl http://www.spock.com/api/1/person.xml...
curl http://www.spock.com/api/1/person.xml...
[2] Done blurb=1
[3] Done gender=1
[4] Done id=sam%2Cwayne
[5] Done names=3
[6] Done pictures=3
[7] Done picture_sizes=small_width
[8] Done location=1
[9] Done websites=3
My-Computer:~ ComputerUser$ <?xml version="1.0" encoding="UTF-8"?>
<response>
<error>No ID specified.</error>
</response>
Yes - my api key is working. I replaced it here for security reasons. The call count keeps getting incremented.
Any suggestions on problems with the call?
I’m frustrated
-
Inappropriate?You need to quote the URL before passing it to curl. For example, here's your command with double-quotes around the URL:
curl "http://www.spock.com/api/1/person.xml?api_key=MyAPIKeyGoesinHere&blurb=1&gender=1&id=sam%2Cwayne&names=3&pictures=3&picture_sizes=small_width&location=1&websites=3&tags=10"
If you don't have the quotes, your shell rather than curl processes the ampersand characters (&) so it runs 9 different commands instead of 1. That's why you're seeing the [2], [3], [4], ... [9].
The first command that gets run ends up being:
curl http://www.spock.com/api/1/person.xml...
and Spock is then understandably confused since it doesn't see an "id" parameter so it gives you the "No ID specified" error.
Long story short, use double-quotes when you use URLs at the command line. :) Hope that helps!
The company says
this answers the question
Loading Profile...




