Copy link to clipboard
Copied
With this set of Document Cloud PDF Embed API Client Credentials:
CLIENT ID (API KEY) 411046add6cc41639dd27f9f9b827bab
APPLICATION DOMAIN preview.rpsl.org.uk
Why does this code on preview.rpsl.org.uk:
<div id="adobe-dc-view"> </div>
<!-- Light Box --><script src="https://documentcloud.adobe.com/view-sdk/main.js"></script><script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function(){
var adobeDCView = new AdobeDC.View({clientId: "411046add6cc41639dd27f9f9b827bab", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "https://documentcloud.adobe.com/view-sdk-demo/PDFs/Bodea Brochure.pdf"}},
metaData:{fileName: "Bodea Brochure.pdf"}
}, {embedMode: "LIGHT_BOX"});
});
</script>
Fail with the message indicating that the provided Client ID is not authorized:
File preview not available
This application domain (https://preview.rpsl.org.uk) is not authorized to use the provided PDF Embed API Client ID.
This makes no apparent sense to me - so I am puzzled. Any ideas, please?
Copy link to clipboard
Copied
Hi, sorry to hear that you're facing this issue. Please confirm if you've generated the client ID from here.
Copy link to clipboard
Copied
Yes, Sumona, I generated the client ID at https://www.adobe.io/apis/documentcloud/dcsdk/gettingstarted.html
that is the destination for the link you provide https://www.adobe.com/go/dcsdks_credentials
Copy link to clipboard
Copied
It seems the reason for the failure message:
File preview not available
This application domain (https://preview.rpsl.org.uk) is not authorized to use the provided PDF Embed API Client ID.
is that the connection to 'https://viewlicense.adobe.io/viewsdklicense/jwt' violates the Content Security Policy directive.
It would be useful if the online documentation made it crystal clear as to what had to be included in the CSP directives to ensure that the API software worked.