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

New Here ,
Mar 15, 2021 Mar 15, 2021

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">&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?

TOPICS
PDF Embed API

Views

114

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 17, 2021 Mar 17, 2021

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 17, 2021 Mar 17, 2021

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

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

LATEST

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. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines