# Error on routing - method not allowed

**URL:** https://ask.openrouteservice.org/t/error-on-routing-method-not-allowed/2244
**Category:** QGIS
**Created:** [October 28, 2020, 11:26am UTC](https://ask.openrouteservice.org/t/error-on-routing-method-not-allowed/2244 "2020-10-28T11:26:57Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![gitalexa](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/gitalexa/32/808_2.png) [@gitalexa](https://ask.openrouteservice.org/u/gitalexa)
#### Post date: [October 28, 2020, 11:26am UTC](https://ask.openrouteservice.org/t/error-on-routing-method-not-allowed/2244/1 "2020-10-28T11:26:57Z")

</div>

I have an inputlayer with some lines (each has only 2 points). I want to route a possible way for each line. It should be routing between the starting and the end of the line.

Is this possible? Do i have to “transform” the layer?

If i try it i always get this error:

`Network error #405: Error transferring https://api.openrouteservice.org/v2/directions/driving-car/geojson?coordinates=16.45334,48.26959%7C16.453581,48.270512&elevation=True&format=geojson&geometry=true&geometry_format=geojson&id=None&instructions=false&preference=fastest&profile=driving-car - server replied: Method Not Allowed`

---

<div class="post-metadata">

### Author: ![amandus](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/amandus/32/669_2.png) [@amandus](https://ask.openrouteservice.org/u/amandus)
#### Post date: [October 30, 2020, 8:33am UTC](https://ask.openrouteservice.org/t/error-on-routing-method-not-allowed/2244/2 "2020-10-30T08:33:58Z")

</div>

Hi @gitalexa,

The `v2/directions/{profile}/geojson` endpoint only takes POST requests.  
You seem to be sending a GET request.

Please check the documentation on [https://openrouteservice.org/dev/#/api-docs/v2/directions/{profile}/geojson/post](https://openrouteservice.org/dev/#/api-docs/v2/directions/%7Bprofile%7D/geojson/post) and take a look at the examples (example code button next to Call button)  
You need to send your parameters in the Body of the request.

Best regards

---

<div class="post-metadata">

### Author: ![gitalexa](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/gitalexa/32/808_2.png) [@gitalexa](https://ask.openrouteservice.org/u/gitalexa)
#### Post date: [October 30, 2020, 9:33am UTC](https://ask.openrouteservice.org/t/error-on-routing-method-not-allowed/2244/3 "2020-10-30T09:33:42Z")

</div>

Hi @amandus,

i am using the gui from the plugin in qgis. So i cant’t change the way how it send the request…

Can it also depending in the layertype of my qgis-project?

Alex

---

<div class="post-metadata">

### Author: ![adam](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/adam/32/8_2.png) [@adam](https://ask.openrouteservice.org/u/adam)
#### Post date: [October 30, 2020, 10:14am UTC](https://ask.openrouteservice.org/t/error-on-routing-method-not-allowed/2244/4 "2020-10-30T10:14:18Z")

</div>

Hi @gitalexa,  
I just looked into the code for the plugin and it seems it is a bug in there - I don’t know the code well though so I can’t say for sure. I have created an issue for it though, so when there is the next releases (which will hopefully be relatively soon) that should be fixed ([https://github.com/GIScience/orstools-qgis-plugin/issues/123](https://github.com/GIScience/orstools-qgis-plugin/issues/123))

For now though, it seems the only way around would be to use point layers rather than line. I don’t think there is a way though of creating multiple routes from the same layer this way though

---

<div class="post-metadata">

### Author: ![amandus](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/amandus/32/669_2.png) [@amandus](https://ask.openrouteservice.org/u/amandus)
#### Post date: [April 30, 2021, 4:26pm UTC](https://ask.openrouteservice.org/t/error-on-routing-method-not-allowed/2244/5 "2021-04-30T16:26:34Z")

</div>

@gitalexa

this should be finally fixed in the new 1.3.0 release of the plugin

Cheers
