Why am I getting "SignatureDoesNotMatch" error when uploading a file?
started a topic
over 6 years ago
I am trying to upload a file using the File API version 3, and I am getting a "signature does not match" error when I hit the Google API upload URL. Here is a copy of the request and response. Is this an issue with my request configuration?
PUT /kinvey_production_34dsfd343a1b695328f48c7a967122772540e24/f343asd-b4ed-dfda44d44324343-77acedd7f041/g8392fdssds-3432sdf-a89b-5d341e12cd19b5a?GoogleAccessIdemail@example.com&Expires=1372859776&Signature=lGfk3bfbGpFy%2BQr8aff8nuZG%2B4o4RJwyC%2FxLeXUwD%2F5lkrw7xwA4chpzVK1nmdjfd8Fjdkf7vexaadf%2BpH5efJDFj38949gfstCLnFHfTZGSu9QCraOZ%2BMUDEgbCEVAB9ZNyKnk5R1KDF9ngfjgf8fg%3D HTTP/1.1
HTTP/1.1 403 Forbidden
Content-Type: application/xml; charset=UTF-8
Date: Wed, 03 Jul 2013 13:55:48 GMT
Server: HTTP Upload Server Built on Jun 28 2013 13:27:54 (1372451274)
SignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check your Google secret key and signing method.PUT
Are you including the X-Kinvey-Content-Type header when making the initial PUT request to Kinvey?
Due to the way in which URL signatures are generated, if you are uploading a file to Google Cloud Storage and wish to specify a Content-Type, you must include the same content type in the X-Kinvey-Content-Type header when making the original request to Kinvey, so that the signature of the _uploadURL is properly created. See http://devcenter.kinvey.com/rest/guides/files#SpecifyingaContentType for an example.
about 6 years ago
I have the same problem, even though I am not setting a Content-Type. I only provide the Content-Length as stated in the documentation. I get this same error.
I have tried file upload with Android SDK as well with no luck. Question regarding that problem is here: http://support.kinvey.com/hc/communities/public/questions/200518593-File-Uploading-SocketTimeoutException-Read-timed-out
about 6 years ago
Hi Janaka, can you post the exact error you are getting from GCS (the body of the SignatureDoesNotMatch error) ?