Regarding issue getting in upload image API
Publicado 20 feb 2023
Hi,
I need to upload image in Zendesk via Zendesk API by using upload image API(api/v2/guide/user_images/uploads) and it gives me below result:
{
"upload": {
"headers": {
"Content-Disposition": "attachment; filename=\"01GSQ3Y94FBMHZ51PGBV67TJD0.png\"",
"Content-Type": "image/png",
"X-Amz-Server-Side-Encryption": "AES256"
},
"token": "01GSQ3Y94FBMHZ51PGBV67TJD0",
}
}
This is the payload that I'm using
{"content_type": "image/png", "file_size": 2000000}
There is also one more PUT API in Zendesk that I suppose to use after this API and on that API according to the Zendesk API doc I need to use the Url and headers getting from the above API result but it gives me the below error:
Error>
<Code>SignatureDoesNotMatch</Code>
<Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
<AWSAccessKeyId>AKIARVNLH63KPZQDCDUH</AWSAccessKeyId>
<StringToSign>AWS4-HMAC-SHA256
20230220T095437Z
20230220/eu-west-1/s3/aws4_request
4678fe469f30b5aea4740a3b1873650842ec249f0b1ea51d11d49c50ad30f413</StringToSign>
<SignatureProvided>a9b8d786c78aa71d8bab10e6837c9015db6ce40765a8185b402e8173a8bc5b4a</SignatureProvided>
<StringToSignBytes>41 57 53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 0a 32 30 32 33 30 32 32 30 54 30 39 35 34 33 37 5a 0a 32 30 32 33 30 32 32 30 2f 65 75 2d 77 65 73 74 2d 31 2f 73 33 2f 61 77 73 34 5f 72 65 71 75 65 73 74 0a 34 36 37 38 66 65 34 36 39 66 33 30 62 35 61 65 61 34 37 34 30 61 33 62 31 38 37 33 36 35 30 38 34 32 65 63 32 34 39 66 30 62 31 65 61 35 31 64 31 31 64 34 39 63 35 30 61 64 33 30 66 34 31 33</StringToSignBytes>
<CanonicalRequest>PUT
/29/14805692/01GSQ3Y94FBMHZ51PGBV67TJD0
X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIARVNLH63KPZQDCDUH%2F20230220%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20230220T095437Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=content-disposition%3Bhost%3Bx-amz-server-side-encryption&x-id=PutObject
content-disposition:attachment; filename=\"01GSQ3Y94FBMHZ51PGBV67TJD0.png\"
host:uploaded-assets-pod29.s3.eu-west-1.amazonaws.com
x-amz-server-side-encryption:AES256
content-disposition;host;x-amz-server-side-encryption
UNSIGNED-PAYLOAD</CanonicalRequest>
Can anyone help?
0
0
0 comentarios
Iniciar sesión para dejar un comentario.