Invalid Signature - Creating Flickr Photoset - api

I'am trying now for hours to get a valid api call for flickr. The following link is build by my clojure program:
"http://api.flickr.com/services/rest/?method=flickr.photosets.create&oauth_signature=
{sig}&oauth_token={token}&oauth_consumer_key={key}&oauth_signature_method=HMAC-SHA1&oauth_timestamp={time}&oauth_nonce={nonce}&oauth_version=1.0&title={title}&primary_photo_id={photoid}&format=json&nojsoncallback=1"
And that is the message the browser returns:
oauth_problem=signature_invalid&debug_sbs=GET&http%3A%2F%2Fapi.flickr.com%2Fservices%2Frest%2F&format%3Djson%26method%3Dflickr.photosets.create%26nojsoncallback%3D1%26oauth_consumer_key%3D23XXXXXXXXXXX6e46a05ae55c4%26oauth_nonce%3De6u52XXXXXXXXXpphqner4e0j%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D13XXXXX06%26oauth_token%3D721XXXXXXXX503-356bXXXXXXXf66e%26oauth_version%3D1.0%26primary_photo_id%3D12345678%26title%3Dphotoset-title
Calls with method "flickr.photosets.getPhotos" and "flickr.photosets.getList" are working.
Thanks for any help!

The signature is invalid. The result you're getting is the correct string you should have sent. Please post the signature you sent and the signature it posted back. You need to compare them and see what's wrong with the one you sent.

Related

Why Postman send empty data in POST method

When I develop POST api, I used POSTMAN I create following request
But it seems send empty request to servers.
When I check server, the following error was displayed
Error: data and salt arguments required
It means empty body was send via POSTMAN
On the other hand ,When I tried
curl --data "loginId=hikaru&password=test" http://localhost:3000/user
following error was occured but some data was send and reached
ER_NO_DEFAULT_FOR_FIELD: Field 'firstName' doesn't have a default value
So what is the difference between POSTMAN and command ?
What is the wrong point of postman
I'd like to fix it.
If someone has opinion,please let me know.
Thanks

Cloudconvert File not found (upload failed)

I plan on using cloudconverts API API for converting docx files to pdf but im stuck with a File not found (upload failed) error each time i have started a conversion process and request the status of the conversion.
To make sure the file can be reached, i ran a test using their API and executing my request which was a success.
Im testing the conversion using Googles Advanced Rest Client and my header og payload is as follows:
Requesting a process:
Im getting an URL for my convertion process and all is good. So time to start my process of converting my file. Im using the option to let cloudconvert download the docx from my domain.
Starting my process:
The request for starting my process is also a succes and i now want to check the status of my conversion by calling the previous url as a GET. But this gives me an error message in the response saying: File not found (Upload failed)
As written in the beginning of my post, i tried using their API console to test if the file can be downloaded from my site, which it could and PDF was created successfully .. So i guess im missing something somewhere, just cant see it...
So yeah,
First problem was that there was wrong content-type header set. For JSON payload it should be "application/json". With "application/x-www.form-urlencoded" content type header the server expected different payload so the call resulted with error.
Second one was about JSON parsing. JSON is not the same as JavaScript object. Keys in JSON must contain double quotes characters.
Finally I'm not sure what do you mean by success response. If you talking about status code - well it's just bad API configuration/design.

which tokens/codes/ids actually need to be exchanged for google oauth

i'm trying to follow the example code on google's website here, but it seems a little broken - the javascript references getting a list of people from the server, but in the server-side code there's no reference to calling those functions of the api, it just returns an HTTP status code and a text status, so i'm wondering if there's a step missing and i'm exchanging the wrong code at the wrong time.
my current flow is
login button button clicked, magic happens, my callback gets passed an object with a whole bunch of properties in it
I take the code property from that object, and post it back to my server in an ajax request
on my server, i run the following python, where auth_code_from_js is the data of my post request:
oauth_flow = client.flow_from_clientsecrets('client_secrets.json', scope='')
credentials = oauth_flow.step2_exchange(auth_code_from_js)
python throws a FlowExchangeError with the message invalid request and no other useful information
am i missing a step? is that initial 'code' property what i'm supposed to be passing in to the 'step2_exchange' method?

invalid_request error when getting access token

I'm trying to get my access token for my application, using this URL:
https://datamarket.accesscontrol.windows.net/v2/OAuth2-13?grant_type=client_credentials&client_id=//CLIENT ID//&client_secret=//CLIENT SECRET//=&scope=http://api.microsofttranslator.com
Obviously I replace //CLIENT ID// and //CLIENT SECRET// with my applications information.
I tried encoding the tokens with HtmlEncode in my application but got a 400 error. So I tried the request in my browser and this is the JSON response I got:
{
"error":"invalid_request",
"error_description":"ACS90007: Request method not allowed. \r\nTrace ID: 2144c829-f3fa-4ed8-80e6-40841e6a3f69\r\nTimestamp: 2012-06-27 01:11:27Z"
}
I don't know what I'm doing wrong, any help?
I believe when you are making the WebRequest call your parameter is set to use GET and this will cause error ACS90007. When making the WebRequest call please use POST along with application/x-www-form-urlencoded set Content-Type.
If you still have problem post your WebRquest code snippet and i will take a look.
It would be better if you can provide the code for AdmAuthentication. For now, please make sure you have correctly translated the code on http://msdn.microsoft.com/en-us/library/hh454950 to VB. Please also try to use Fiddler to monitor the request to ensure it is sending a POST request.
Best Regards,
Ming Xu.
Making my own client secret helped my cause

What does "Predicate Mismatch for View"

I am writing a iOS client for a an existing product that uses a legacy SOAP webservice. I got the proper URL to send my SOAP/XML messages too and even have some samples. However, none of them seem to work...
I always get a 404 error with the following error text "Predicate mismatch for View"
I am using an ASIFormDataRequest for the actual request and apending the data (SOAP XML in this case) via [someFormRequest appenData:myData].
I am flat out of ideas here and am wondering what, if anything I am doing wrong. Or should I ping one of the back end guys? Could this error be a result of something on the server side?
This is an error message spit out by the pyramid web framework when attempting to access a URL without supplying all of the required parameters. You definitely want to double check that the URL you are using has all of the required params (headers, query string options, request body, etc) and if you're convinced that what you are sending is correct then but your backend guys because it's definitely a miscommunication or a bug between the two of you.