Skip to main content
Participant
March 15, 2021
Question

"File preview not available" Application Domain not Authorized when Client ID is for the Domain

  • March 15, 2021
  • 2 replies
  • 865 views

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">&nbsp;</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?

This topic has been closed for replies.

2 replies

MarkITBAuthor
Participant
May 10, 2021

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. 

Adobe Employee
March 17, 2021

Hi, sorry to hear that you're facing this issue. Please confirm if you've generated the client ID from here.

MarkITBAuthor
Participant
March 17, 2021

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