HTTPError: 403 Client Error: Forbidden

67 katselukertaa
Siirry ensimmäiseen lukemattomaan viestiin

Magdalena Surówka

lukematon,
13.9.2022 klo 8.10.5313.9.2022
vastaanottaja GeoAdminCh API
I am getting following error on api3.geo.admin.ch:

requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api3.geo.admin.ch/rest/services/api/SearchServer?searchText=Christoffelgasse+5%2C+3003+Bern&type=locations

Any idea what could be the reason?

I have made sure the API limits are respected, but the problem persists.

David...@swisstopo.ch

lukematon,
13.9.2022 klo 8.40.2713.9.2022
vastaanottaja geoadm...@googlegroups.com

Hi

If you search for https://api3.geo.admin.ch/rest/services/api/SearchServer?searchText=Christoffelgasse%205%20Bern&type=locations

Everything works fine

 

The official Zip is “Christoffelgasse 5 3011 Bern” 3003 is an auxillary zip which is not official

 

David

--
You received this message because you are subscribed to the Google Groups "GeoAdminCh API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoadmin-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geoadmin-api/3e5478b1-6bd6-48a8-86b1-7d96d5d0855bn%40googlegroups.com.

Magdalena Surówka

lukematon,
15.9.2022 klo 5.00.1015.9.2022
vastaanottaja geoadm...@googlegroups.com

Indeed it works in the browser. However, I am getting the error when sending requests via Postman or with a script. 

Are there any parameters that need to be defined in request headers? 

Full error trace is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>

<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD>

<BODY>
<H1>403 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
Bad request.
We can't connect to the server for this app or website at this time. There might be too much traffic or a
configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: McxRi64PET8JL0KoDV5OAnimUrrKylxIbpWrmfkSAyBesytpNc91Lw==
</PRE>
<ADDRESS>
</ADDRESS>
</BODY>

</HTML>

You received this message because you are subscribed to a topic in the Google Groups "GeoAdminCh API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geoadmin-api/8yIrwgQI0HU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geoadmin-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geoadmin-api/9587b3c533854cb79a46e24ae0a345de%40swisstopo.ch.

David...@swisstopo.ch

lukematon,
15.9.2022 klo 5.10.3815.9.2022
vastaanottaja geoadm...@googlegroups.com

Magdalena Surówka

lukematon,
15.9.2022 klo 5.35.0515.9.2022
vastaanottaja geoadm...@googlegroups.com

Jürgen Hansmann

lukematon,
15.9.2022 klo 5.56.4915.9.2022
vastaanottaja GeoAdminCh API
Hi Magdalena

Can you please add the full request (or the snippet, where you do the actual request)?
That would identifying the issue.

Thanks a lot and best regards
Juergen

Magdalena Surówka

lukematon,
15.9.2022 klo 6.31.1515.9.2022
vastaanottaja geoadm...@googlegroups.com
Hi Jürgen

I managed to get it to work. The method update (post->get) didn't get saved.
Thank you for your support!

Magdalena


Jürgen Hansmann

lukematon,
16.9.2022 klo 8.12.0416.9.2022
vastaanottaja GeoAdminCh API
Hi Magdalena

That's good to hear, have a nice weekend!

BR
Juergen
Vastaa kaikille
Vastaa kirjoittajalle
Välitä
0 uutta viestiä