Copy link to clipboard
Copied
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-authoriz...
<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>
<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!
Copy link to clipboard
Copied
Can you send a link to the page you have the code embedded in?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
but even i don't use brackets, i have same issues, can you help ?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Please check the domain you authorised. Your link does not work for me, but the different domain https://www.muftiismailtoru.com/adobeapi.php does work for me.
Copy link to clipboard
Copied
I am also wonder , on m y other domain , same code yesterday was not working, but worked once time today
https://abdulwaheed.pk/adobeapi.php
and not working now . saying preview is not available . this adobe is really mess,
Copy link to clipboard
Copied
can u check if it works on
1. sub domain
2. works for .pk domain
3. works for .st domain
my one main domain .com is working
but same thing not working on other sub domain
https://dev.konobia.st/index.php?option=com_pdfviewer&view=pdfviewer&Itemid=196#
and this
https://abdulwaheed.pk/en/pdf-viewer-demo
white both has project in adobe api console
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Is that the EXACT domain you registered? Exact means it won't work if you registered www.pdf18.com for example.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
https is not part of the domain name. It is the protocol, which is entirely different.
Make sure https://www.domain.com/ isn't forwarding (e.g. to https://domain.com)
Copy link to clipboard
Copied
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.