Skip to main content
Inspiring
March 17, 2021
Question

File cannot be loaded, application is not authorized

  • March 17, 2021
  • 3 replies
  • 1096 views

Good afternoon,

I am facing the problem that after creating an api key and authorizing the domain csites.rinnen-clervaux.com I get the error: This application domain (https://csite.rinnen-clervaux.com:8443) is not authorized to use the provided PDF Embed API Client ID.

 

I am using the testcode:

 

<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: "4c2f21c1449e45a7a5274ce59fccb357", 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>

 

API KEY

4c2f21c1449e45a7a5274ce59fccb357
 
ALLOWED DOMAIN
csite.rinnen-clervaux.com
 
Best regards
 
Mirko Beckmann
 

 

    This topic has been closed for replies.

    3 replies

    Mirko5E9CAuthor
    Inspiring
    March 23, 2021

    This code is recommended by adobe and checking the console I get a 401 error meaning I am unauthorized.

    Besides I get problems with cross site cookies. So this does not seem to be usable on subdomains.

     

    <div id="adobe-dc-view" style="height: 500px; width: 750px;"></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: "4c2f21c1449e45a7a5274ce59fccb357", divId: "adobe-dc-view"});
    adobeDCView.previewFile({
    content:{location: {url: "https://csite.rinnen-clervaux.com:8443/AutoAttendant.pdf"}},
    metaData:{fileName: "UK-COVID-19.pdf"}
    }, {embedMode: "SIZED_CONTAINER"});
    });
    </script>

     

    Rgds

     

    Mirko

    Mirko5E9CAuthor
    Inspiring
    March 19, 2021

    Okay I got a bit further the problem seems to be that the subdomain csite is pointing to another ip than the domain itself.

    Putting the file on the server to which the domain is pointing, everything is running fine.

    So that means, there is perhaps a problem with the subdomain on another ip.

    Creating credentials separately for the subdomain does not work.

     

    Best regards

    Mirko

     

     

    Joel Geraci
    Community Expert
    Community Expert
    March 19, 2021

    Try creating credentials with just the domain, no subdomain. Just "rinnen-clervaux.com" 

    Mirko5E9CAuthor
    Inspiring
    March 19, 2021

    I already did that. That's how the credentials are actually but the same error reoccurs.

    Must be something IP based I think. Lets assume that when creating the credentials only the domain is considered and not the subdomain, then it is quite clear why this is not working.

    The ip from rinnen-clervaux.com is expected but the subdomain csite is pointing to another ip.

    So no authorization granted. Would make sende because if I run the same script from rinnen-clervaux.com it works flawlessly.

     

    Best regards

     

    Mirko

     

    Joel Geraci
    Community Expert
    Community Expert
    March 17, 2021

    Assuming your API key and domain are correct, try removing the divId parameter. It's not necessary for LIGHT_BOX.

    Mirko5E9CAuthor
    Inspiring
    March 18, 2021

    Good morning Joel,

    thanks for the advice but the error persists.

    I already deleted the credetials and created new ones but without success.

     

    Best regards

     

    Mirko