Skip to main content
Participant
Mar 27, 2020 1:56 AM UTC
Question

Testing view sdk pdf embed on localhost

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

51 replies

Participant
Jun 15, 2023 1:26 PM UTC

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

Translate
Raymond Camden
Community Manager
Community Manager
Jun 15, 2023 1:32 PM UTC

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

Translate
Participant
Jun 15, 2023 1:39 PM UTC

Hi Raymond. I've messaged you the key.

Translate
Participating Frequently
Jun 14, 2023 12:14 AM UTC

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

 

Translate
Raymond Camden
Community Manager
Community Manager
Jun 14, 2023 1:30 PM UTC

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

Translate
Participating Frequently
Jun 14, 2023 3:37 PM UTC

Yes

Translate
JustACodeMonkey
Participating Frequently
Sep 8, 2022 3:56 PM UTC

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?

Translate
JustACodeMonkey
Participating Frequently
Sep 8, 2022 5:32 PM UTC

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.

 

Translate
Raymond Camden
Community Manager
Community Manager
Sep 9, 2022 3:10 PM UTC

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

Translate
Participant
Aug 23, 2020 9:20 PM UTC

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

Translate
Participant
Aug 28, 2020 2:47 PM UTC

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 

Translate
Harender Bhardwaj
Adobe Employee
Adobe Employee
Aug 31, 2020 8:21 AM UTC

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.

 

Translate
Participant
Apr 7, 2020 7:51 PM UTC

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

Translate
Ben Vanderberg
Community Manager
Community Manager
Apr 7, 2020 10:28 PM UTC

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.

Translate
Participating Frequently
Jun 1, 2020 5:48 AM UTC

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!

Translate
Adobe Employee
Mar 31, 2020 10:10 AM UTC

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.

Translate