HTTP java request Error 403

HI all

I am new user of OSM and in a java code i obtain an HTTP eror 403. I don’t understand can you help me:
Here is the code i use:

		System.setProperty("USER.AGENT", "Application/1.0 (Java/17.0.9)");
			String st = "" + zoom + "/" + xt + "/" + yt;
		URL url = new URL("https://b.tile.openstreetmap.org/" + st + ".png");
		image = ImageIO.read(url);

zoom = 11
xt 1034
yt 713

Thanks a lot for your help.

Antonio

5 posts - 3 participants

Read full topic


Ce sujet de discussion accompagne la publication sur https://community.openstreetmap.org/t/http-java-request-error-403/106698