Skip to main content
Participant
March 27, 2020
Question

Testing view sdk pdf embed on localhost

  • March 27, 2020
  • 6 replies
  • 27952 views

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

6 replies

Participant
June 15, 2023

I'm also getting this error. At first I was adding 2 domains. I read the latest answer with the error on multiple domains. So I created a new project with only localhost in allowed domains. I'm getting the error in React app running on port 3005 (see attached screenshots).

Raymond Camden
Community Manager
Community Manager
June 15, 2023

I have never had an issue with nonstandard ports. Do you mind sharing the key you used?

Participant
June 15, 2023

Hi Raymond. I've messaged you the key.

Participating Frequently
June 14, 2023

I'm also getting this error. How long does it take to propogate the allowed domains?

 

Raymond Camden
Community Manager
Community Manager
June 14, 2023

It should be very fast. Are you sure you used http://localhost for the domain?

Participating Frequently
June 14, 2023

Yes

JustACodeMonkey
Participating Frequently
September 8, 2022

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?

JustACodeMonkey
Participating Frequently
September 8, 2022

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.

 

Raymond Camden
Community Manager
Community Manager
September 9, 2022

The port should not matter. When you created the credentials, did you use "localhost" (no port) as the domain?

Participant
August 23, 2020

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". 

Participant
August 28, 2020

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.

 

https://share.getcloudapp.com/7KuLkoqx 

Harender Bhardwaj
Adobe Employee
Adobe Employee
August 31, 2020

Hi,

 

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.

 

https://www.adobe.io/apis/documentcloud/dcsdk/gettingstarted.html#

 

Please let us know if you further face any issue.

 

Participant
April 7, 2020

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

Ben Vanderberg
Community Manager
Community Manager
April 7, 2020

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.

Participating Frequently
June 1, 2020

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!

Adobe Employee
March 31, 2020

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.