Copy link to clipboard
Copied
Hello:
I have PDF stored as blobs in local storage (indexed.db). When I read I get a 401 error in console.
var adobeDCView = new AdobeDC.View({ clientId: "xxxx", divId: 'pdf-content' });
adobeDCView.previewFile({
content: { promise: store.get('test.pdf' },
metaData: { fileName: "test.pdf" }
},
{
embedMode: "SIZED_CONTAINER"
});
I get a : ViewSDKInterface.js:1 POST https://viewlicense.adobe.io/viewsdklicense/jwt 401 (Unauthorized) error. I
You have to generate a client ID if you wish to use a web server. You can set the domain as localhost.
Please try creating credentials from https://www.adobe.io/apis/documentcloud/dcsdk/gettingstarted.html
Hope this helps.
Copy link to clipboard
Copied
Thank you for using PDF Embed API. The error seems to indicate that your webpage domain is not authorized to use the client ID configured in the code. Would be great if you could check and confirm if the client ID is used with the correct domain.
Copy link to clipboard
Copied
Unfortunately I have not been able to set the credentials to localhost to test out the new API. And I cannot risk putting it in our production domain. So what would be a suitable solution? Thanks
Copy link to clipboard
Copied
You have to generate a client ID if you wish to use a web server. You can set the domain as localhost.
Please try creating credentials from https://www.adobe.io/apis/documentcloud/dcsdk/gettingstarted.html
Hope this helps.
Copy link to clipboard
Copied
Yes Sumona Ghosh it worked. Earlier I was trying to change an existing console project and it somehow prevented me from setting it. Thanks.
Copy link to clipboard
Copied
not able to set domain localhost getting error.
what should i do? I want to run it on localhost:4200
Copy link to clipboard
Copied
Please try creating new credentials from here: https://www.adobe.io/apis/documentcloud/dcsdk/gettingstarted.html
You need to set the Application Domain as localhost. Hope this works.