Copy link to clipboard
Copied
I am trying to use the PDF Embed API on a web app developed with Google Apps Script's HtmlService.
I am using the sample code, with the only change being the updated client ID. When deployed, the error states: "This application domain (https://n-oglre90lc7wy45865lvkriotploicflop75k7o-ppu-script.googleusercontent.com) is not authorized to use the provided PDF Embed API Client ID." When adding the domain to the credential, the url was flagged as invalid with "https://", so I removed the "https://" and it allowed me to enter the domain. The error persists. Can this tool be used with the GAS's HtmlService? If so, how should the domain be entered?
<div id="adobe-dc-view"></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: "<YOUR_CLIENT_ID>", 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"}
});
});
</script>
Create a new credential using just "googleusercontent.com", not the full URL without the protocol.
Copy link to clipboard
Copied
Create a new credential using just "googleusercontent.com", not the full URL without the protocol.
Copy link to clipboard
Copied
That did it! Thank you so much.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more