Skip to main content
Participant
August 27, 2020
Question

This application domain is not authorized

  • August 27, 2020
  • 4 replies
  • 10156 views

I'm having issues getting a "domain is not authorized error" when I attempt to utilize the PDF Embed API.

 

The error is:
"File preview not available. This application domain (https://generation180.org) is not authorized to use the provided View SDK Client ID."

 

I'm referencing this article for how to accomplish this: https://www.labnol.org/embed-pdf-200208

 

I also found this post which I tried the steps but they don't work either. https://community.adobe.com/t5/document-services-apis/file-preview-not-available-domain-not-authorized/m-p/11180446?page=1#M273

 

Here is the PDF I'm trying to embed: https://generation180.org/wp-content/uploads/2020/07/SSVAPressRelease_v04EMBARGOED.pdf

Here are the credentials:

 

And here is my code:

 

<div id="adobe-dc-view" style="width: 800px;"></div>
<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: "<892f63d447094d01bc1691a9a82af8d2>", divId: "adobe-dc-view"});
		adobeDCView.previewFile({
			content:{location: {url: "/wp-content/uploads/2020/07/SSVAPressRelease_v04EMBARGOED.pdf"}},
			metaData:{fileName: "Summary.pdf"}
		}, {embedMode: "IN_LINE"});
	});
</script>​

 

 
I've also tried the code with the full URL of the PDF:

 

<div id="adobe-dc-view" style="width: 800px;"></div>
<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: "<892f63d447094d01bc1691a9a82af8d2>", divId: "adobe-dc-view"});
		adobeDCView.previewFile({
			content:{location: {url: "https://generation180.org/wp-content/uploads/2020/07/SSVAPressRelease_v04EMBARGOED.pdf"}},
			metaData:{fileName: "Summary.pdf"}
		}, {embedMode: "IN_LINE"});
	});
</script>​

 

 

Thank you for your help!

This topic has been closed for replies.

4 replies

Nibha24114765u2cs
Participating Frequently
May 1, 2023

I have created the localhost key. and it worked with https://localhost But not working for app://localhost.

Is both URLs different? If yes then how to create a key for "app://localhost"?

I have been facing this issue since 25 Apr 2023 before this it was working for both https://localhost and app://localhost.

Participant
January 20, 2023

I have also installed Pdf Embed plugin. But it is also showing me this error-

This application domain (https://pdf18.com) is not authorized to use the provided PDF Embed API Client ID.

Aman Kumaar
Legend
January 20, 2023

Is that the EXACT domain you registered? Exact means it won't work if you registered www.pdf18.com for example. 

Participant
March 29, 2023

Same problem here. Is not possible to register a domain with https in the Adobe console, the return is that the url is invalid. If I register www.domain.com and try to acess pdf in https://www.domain.com i get a error. And i have another project that works, i have no ideia why. Is there a limit of projects or something like that?

Adobe Employee
August 30, 2020

Hi, thank you for using PDF Embed API.

Please try using the client ID without the angular brackets.

 

var adobeDCView = new AdobeDC.View({clientId: "892f63d447094d01bc1691a9a82af8d2", divId: "adobe-dc-view"});

 

Hope this works for you.

Participant
March 12, 2022

but even i don't use brackets, i have same issues, can you help ?

Legend
March 12, 2022

If you don't use brackets it isn't the same issue!  But the same good suggestion applies... Please post a link to a page showing the problem.

Joel Geraci
Community Expert
Community Expert
August 27, 2020

Can you send a link to the page you have the code embedded in?