Hello, I am having issues accessing a public asset image that I have uploaded. These are the steps I've taken to upload it:
- Send an upload URL request (/api/v2/uploads/publicassets/images) to get a presigned upload URL:
{
"fileName": "winter_phone.jpg",
"contentType": "image/jpeg"
}
NOTE: "https://" has been replaced with (insert-https-here) and "s3://" has been replaced with (insert-s3-here)
API Response (security token and signature have been edited):
{
"url": "(insert-https-here)fileupload.euw2.pure.cloud/uploads/v1/publicassets/images/6b6e4616-5247-41b8-8121-aefc30b12b93/0843276e-8581-408d-8742-f11e06a6a2db.winter_phone.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3EQYLGB76N25HWAE%2F20230908%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230908T093015Z&X-Amz-Expires=600&X-Amz-SignedHeaders=content-type%3Bhost%3Bx-amz-meta-organizationid%3Bx-amz-tagging&X-Amz-Security-Token=my-security-token&X-Amz-Signature=my-signature",
"fileUrl": "(insert-s3-here)public-assets-uploads-prod-euw2/uploads/v1/publicassets/images/6b6e4616-5247-41b8-8121-aefc30b12b93/0843276e-8581-408d-8742-f11e06a6a2db.winter_phone.jpg",
"uploadKey": "uploads/v1/publicassets/images/6b6e4616-5247-41b8-8121-aefc30b12b93/0843276e-8581-408d-8742-f11e06a6a2db.winter_phone.jpg",
"headers": {
"x-amz-tagging": "organizationId=6b6e4616-5247-41b8-8121-aefc30b12b93&originPlatform=GenesysCloud&role=darth&owner=Dev-CloudAppsDarth@genesys.com",
"x-amz-meta-organizationid": "6b6e4616-5247-41b8-8121-aefc30b12b93",
"Content-Type": "image/jpeg"
}
}
- Upload the image by doing the following PUT request (using curl):
curl -X PUT -T "C:\Users\GRIGS\Pictures\winter_phone.jpg" "(insert-https-here)fileupload.euw2.pure.cloud/uploads/v1/publicassets/images/6b6e4616-5247-41b8-8121-aefc30b12b93/0843276e-8581-408d-8742-f11e06a6a2db.winter_phone.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3EQYLGB76N25HWAE%2F20230908%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230908T093015Z&X-Amz-Expires=600&X-Amz-SignedHeaders=content-type%3Bhost%3Bx-amz-meta-organizationid%3Bx-amz-tagging&X-Amz-Security-Token=my-security-token&X-Amz-Signature=my-signature" -H "x-amz-tagging: organizationId=6b6e4616-5247-41b8-8121-aefc30b12b93&originPlatform=GenesysCloud&role=darth&owner=Dev-CloudAppsDarth@genesys.com" -H "x-amz-meta-organizationid: 6b6e4616-5247-41b8-8121-aefc30b12b93" -H "Content-Type: image/jpeg"
I get an empty 200 OK response.
What is the URL of the image supposed to be after it's uploaded? I tried (insert-https-here)api-cdn.euw2.pure.cloud/uploads/v1/publicassets/images/6b6e4616-5247-41b8-8121-aefc30b12b93/0843276e-8581-408d-8742-f11e06a6a2db.winter_phone.jpg ((insert-https-here)api-cdn.euw2.pure.cloud/{uploadKey}), but I get an
"Access Denied" error. However, I can access an image uploaded via the UI (a Messenger Configuration bot picture) just fine: (insert-https-here)api-cdn.euw2.pure.cloud/uploads/v1/publicassets/images/6b6e4616-5247-41b8-8121-aefc30b12b93/3328480c-d9e6-4a60-b9f9-aac55a288f7a.this_is_an_image.jpg