Skip to main content
Participating Frequently
August 25, 2024
Question

The application domain is not authorized to use PDF Embed API only certain devices

  • August 25, 2024
  • 2 replies
  • 4053 views

Hello Adobe Community,

I’m encountering a puzzling issue with the Adobe PDF Embed API. My website integrates the API to display PDFs directly on the page, and it has been working fine for most users. However, recently, I’ve started receiving an error on certain devices that states, “The application domain is not authorized to use the PDF Embed API.”

Here’s some background on the situation:

  • Implementation: The API is correctly set up with the appropriate client ID, and it functions normally on most devices.
  • Issue: On specific devices, the PDF viewer fails to load, showing an error message about the domain not being authorized to use the API.
  • What I’ve Tried:
    • Cleared browser cache on the affected devices.
    • Tested the site across multiple browsers and devices, with the issue appearing only in certain environments.
    • Confirmed that my domain is registered in the Adobe Developer Console and should be authorized.
    • Verified that my website is served over HTTPS.

I’m unsure why this problem is occurring only on certain devices. Has anyone else faced this issue, or does anyone have suggestions for resolving it? Any guidance would be greatly appreciated.

    This topic has been closed for replies.

    2 replies

    Participant
    September 23, 2024

    I am also having problems with ios 18 safari. It seems that pages do not render properly as well, aside from the domain api problem.

    Raymond Camden
    Community Manager
    Community Manager
    September 23, 2024

    Yes, we've confirmed this. I've reported it - will let folks know when there is an update.

    Participant
    September 27, 2024

    I've been able to sort out that both Chrome and Safari have this issue on iOS 18. Is there any solution yet, otherwise all I can do is take all landing pages down with a notice that the PDF viewer is under maintenance.

    Raymond Camden
    Community Manager
    Community Manager
    August 26, 2024

    Not sure what to suggest. Is it always one KIND of device/browser? Or random? If you can run the device in front of you and consistently reproduce, what happens if you use remote browser debugging?

    Participating Frequently
    August 26, 2024

    Thank you for your reply. One of my customers mentioned an issue where they tried to load the application in a different browser, but it kept saying that the application is not authorized. I created a new link and sent it to them, and it worked fine. Here’s a test link: https://vip-shop-management.com/test3.htm. However, this link won’t open on one of my iPhones, but it does open on another iPhone. I tried it on Safari, Google Chrome, and Edge, but got the same results. Could you please check it out?

    Participating Frequently
    August 27, 2024

    Did you try remote debugging to see if anything showed up in the browser console?


    There is nothing debug, the code is straight forward from Adobe, my issue is i don't want my customers to have this problem, if we have to pay for tech support, i'll be happy too. I am running IOS 18 on my iphone 15. However my customer was having the same problem on all his devices. It's a random problem. But customers don't understand random, it's either it works or it doesn't. The error pops up directly from Adobe, the scripts checks the website and the clientId. According to adobe, the website is not authorized. But it is. Here is the code:

     <!DOCTYPE html>
     <html lang="en">
     <head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>View PDF</title>
     <script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>
     </head>
     <body>
     <div id="adobe-dc-view" style="height: 800px; width: 100%;"></div>
     <script>
     /*
     Copyright 2019 Adobe
     All Rights Reserved.
      
     NOTICE: Adobe permits you to use, modify, and distribute this file in
     accordance with the terms of the Adobe license agreement accompanying
     it. If you have received this file from a source other than Adobe,
     then your use, modification, or distribution of it requires the prior
     written permission of Adobe.
     */
      
     /* Control the default view mode */
     const viewerConfig = {
     /* Allowed possible values are "FIT_PAGE", "FIT_WIDTH", "TWO_COLUMN", "TWO_COLUMN_FIT_PAGE" or "". */
     defaultViewMode: "",
     };
      
     /* Wait for Adobe Acrobat Services PDF Embed API to be ready */
     document.addEventListener("adobe_dc_view_sdk.ready", function () {
     /* Initialize the AdobeDC View object */
     var adobeDCView = new AdobeDC.View({
     /* Pass your registered client id */
     clientId: "024dab95555d46c182a49926bfa8e978",
     /* Pass the div id in which PDF should be rendered */
     divId: "adobe-dc-view",
     });
      
     /* Invoke the file preview API on Adobe DC View object */
     adobeDCView.previewFile({
     /* Pass information on how to access the file */
     content: {
     /* Location of file where it is hosted */
     location: {
     url: "https://acrobatservices.adobe.com/view-sdk-demo/PDFs/Bodea Brochure.pdf",
     /*
     If the file URL requires some additional headers, then it can be passed as follows:-
     headers: [
     {
     key: "<HEADER_KEY>",
     value: "<HEADER_VALUE>",
     }
     ]
     */
     },
     },
     /* Pass meta data of file */
     metaData: {
     /* file name */
     fileName: "Bodea Brochure.pdf"
     }
     }, viewerConfig);
     });
     </script>
     </body>
     </html>