Robert_Cooper | 2022-03-10 23:00:50 UTC | #1
Hi team,
Our developers are having issues with the uplaod image API for web messaging.
Below are the steps taken
- Get image size and name
- Call websocket to get upload url
request: { "action": "onAttachment", "fileName": "1.jpeg", "fileType": "image/jpeg", "fileSize": 439054, "token": "11112222" } receive response with 200
- Try curl in Mac terminal
- getting the following error response: <Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.........
Is there any recommendations to debug this issue? Any steps would be greatly appreciated
Julien_Moreau | 2022-03-11 10:32:53 UTC | #2
Can you please share the exact curl command you're using?
Robert_Cooper | 2022-03-15 00:11:58 UTC | #3
Hi Julien,
Please see curl command below: (I have replaced some of the security token)
curl 'https://fileupload.mypurecloud.com.au/webmessaging/uploads/34a2baab-4127-4096-b12b-273c6050f603/9e8d67cd-4a17-4afc-9097-f69623f2a03b.1.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3EQYLGB723LQTY52%2F20220309%2Fap-southeast-2%2Fs3%2Faws4_request&X-Amz-Date=20220309T070029Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host%3Bx-amz-tagging&X-Amz-Security-Token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-Amz-Signature=9d8a4280430fbae2488d6097c04a9da18a8fd5f9bea561aaa61805a74edfbd58' \
-X PUT \
-H "x-amz-tagging": "organizationId=34a2baab-4127-4096-b12b-273c6050f603&originPlatform=PureCloud&role=darth&owner=Dev-CloudAppsDarth@genesys.com" \
--data-binary '@1.jpeg’
Robert_Cooper | 2022-03-15 00:31:49 UTC | #4
Hi Julien,
Would it be possible to get an example of the step by step, potentially a video of a successful image upload so our developers could take reference?
Julien_Moreau | 2022-03-15 09:19:14 UTC | #5
Hi Robert,
That was uneasy to spot, but I was finally able to reproduce the SignatureDoesNotMatch situation. There is a typo in your curl command, an extra space after "x-amz-tagging": The line should be -H "x-amz-tagging":"organizationId=34a2baab-4127-4096-b12b-273c6050f603&originPlatform=PureCloud&role=darth&owner=Dev-CloudAppsDarth@genesys.com" \ or -H "x-amx-tagging: organization..." \
I'm going to fix that in the documentation right now, thank you!
Robert_Cooper | 2022-03-15 21:59:06 UTC | #6
Brilliant, thank you Julien, I have relayed this to our developer team.
Thank you for your assistance, I will loop back with the result.
system | 2022-04-14 21:59:33 UTC | #7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 13879