Hi hi have created my client credentials so I can embed pdfs in my angular application. but I can not get the viewer to display via localhost
Hi, Thanks for raising the point. Ideally it should work, can you provide more information here so that we can see why is it not working. Following information will help: client Id, domain on which you are using it, how are you invoking the SDK and any error if you are seeing in developer console. Thanks.
Just add "localhost" in App Domain while generating a API key and you will be all set to load the viewer on your Localhost. Also, make sure you are accessing Localhost in your browser with localhost in domain, not the IP address
agarwalc is correct. When you create your credentials at https://www.adobe.io/apis/documentcloud/dcsdk/gettingstarted.html, you set your domain to localhost.
Also, if you aren't using a web server and you are just loading a file from file:// then it does not need a client ID.
How does one allow "localhost" as an app domain? When I try adding it, console.adobe.io is rejecting me and saying "Domain localhost is invalid"
Thank you for helping!
I am having the same issue too trying to use localhost:3000. I am not able to get a key for Embed API.
When I try the above link. the page looks to be missing syles and modt of the links get a 404 error.
I'm facing the same problem. If i Use the clientID from PDF Embed API, with domain set to localhost I get this error. When I use the PDF Tools API clientID, it says This application domain (http://localhost:3000) is not authorized to use the provided View SDK Client ID.
Thanks for all the responses. Now we can create credentials with localhost domain from console.adobe.io as well.
Although the best place to create credentials is https://www.adobe.io/apis/documentcloud/dcsdk/viewsdk.html
I too am trying to test and getting the same error while setting localhost
Has anyone solved this? It seems like you can't add localhost to the credentials
I too am looking for the solution.
This works as of 8/21/2020
You can just write "localhost" into the "allowed domain" form field. To run in your local dev environment, map the URL to "localhost" AND port to "80", the default internet port. It may take a few minutes for "localhost" to propogate to your allowed domains. Startup your local server ( with the URL and port bindings just described ) and point your browser to "localhost".
I must be in a different universe because every time I type localhost to configure the API in the adobe console it says Domain localhost is invalid. Here is a picture as of today 8/28.
Is there anything else's you can point me too or is there some other way to create the api.
Sorry for the inconvenience, this issue has already been raised to the concerned team. You have an alternate way (which is recommended though) to create your credentials via below ICA app.
Please let us know if you further face any issue.
I have tried with the new create credentials link but still localhost is not an allowed domain. Any ideas on what else to try because we are blocked on local development.
Hi, could you please share the code snippet where you are using the credentials? If you see any error in the developer console, please share that as well.
Thanks for your response! We actually figured it out. We were testing it out in a shared storybook environment and another story had mocked out the global fetch which was causing some of the adobe API calls to fail.
Resurrection of an old topic. Our application is set to run at localhost:8100 in testing instead of localhost:80 and I get
When I tried to create the credentials with the port number, it fails. Is there a way to use non port 80 URLs?
Update - I am now running on port 80 and receive the same error
It's interesting, because I can see the PDF load and display briefly before that error is displayed and the PDF removed.
The port should not matter. When you created the credentials, did you use "localhost" (no port) as the domain?
Yes, localhost is used without a port on the credentials.
Can you share the snippet of your HTML file where you used Embed?
I was using the demo code
I can see the PDF load correctly into the container. After it loads, it throws up the error message and removes the PDF.
Did you change the client id? Did you change it _completely_? Ie, not <real id>, but just the id.