Jump to content

Get direct URL to image?


Francisco

Recommended Posts

Hello there group!

I am developing an app using the webservice API.

Among other data, I need to fetch the images, for which I get URLs that require authentication.

Now, browser is blocking the requests including the API key in the URL (see attached image).

Wondering now: is there any way to get some URL to the same image that does not require authentication?

Thanks in advance for your time!

Cheers!

image.thumb.png.3a571f13fa05ce696e8be85e839b2109.png

Link to comment
Share on other sites

When getting the images of the product from the webservice, the URLs I am getting look like this:

http://35.183.101.48/api/images/products/15/23

When trying to load this URL from a different browser I get this credentials request:
imageAuthentication.png.4d54261479ed85a50c96066d00809596.png

 

That is why I included the credentials in the URL to be loaded by the browser in this fashion:

http://<API_KEY_HERE>@35.183.101.48/api/images/products/15/23

But when doing so, I am getting errors in the browser:

image.png

So, is there any way to get some URL to the same image that does not require authentication?

Thanks in advance for your time!

Cheers!

 

Link to comment
Share on other sites

I haven't really worked with the API, but it looks like it's looking for both a user and a password.

If the site is functional, you should be able to compare a URL of an image and get it from the working site, but I would try to figure out the API.

Are you able to manually login by entering the credentials in the browser?

 

Link to comment
Share on other sites

Hello Tomerg3,

Comparing won't help:

http://99.79.43.35/api/image/23

http://99.79.43.35/23-large_default/pack-mug-framed-poster.jpg

☝️There is a non predictable part in the URL.

Entering manually the credentials is not an option at the moment.

Is there a specific forum for the API usage where I can get further details on how to solve this?

Thanks for your support!

Link to comment
Share on other sites

All images are accessible without a rewrite URL, they are in /img/p/productid/productid.jpg

You don't need to manually enter the credentials, you just need the correct user+password and use them in the URL as described in the error you saw http://USER:PASS@IPaddress

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...