# The Api always returns "404 route not found"

**URL:** https://forum.shopware.com/t/the-api-always-returns-404-route-not-found/99190
**Category:** Programmierung
**Tags:** general, programming
**Created:** [2. April 2023 um 15:37 UTC](https://forum.shopware.com/t/the-api-always-returns-404-route-not-found/99190 "2023-04-02T15:37:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![quappored8](https://avatars.discourse-cdn.com/v4/letter/q/a88e4f/32.png) [@quappored8](https://forum.shopware.com/u/quappored8)
#### Post date: [2. April 2023 um 15:37 UTC](https://forum.shopware.com/t/the-api-always-returns-404-route-not-found/99190/1 "2023-04-02T15:37:20Z")

</div>

I use a dockware (v6.4.20.0) demo shopware shop for testing the api. But no matter what address I use for api communication (e.g. localhost/api ; localhost/api/orders) I always get the same error message ( {„errors“:[{„code“:„0“,„status“:„404“,„title“:„Not Found“,„detail“:„No route found for \u0022GET http://localhost/api\u0022“}]})

The only exception is localhost/api/oauth/token. This returns {„errors“:[{„code“:„2“,„status“:„400“,„title“:„The authorization grant type is not supported by the authorization server.“,„detail“:„Check that all required parameters have been provided“}]}

even though is send a correctly formated json file in the post request ({  
„client\_id“: „SWIARWPXBHRLR1BQRDV5BLRSVW“,  
„client\_secret“: „dGJCS2pQdEZrMzk3ZkZCEEQYS1ViMmppYnQ0N2FhR054UXNBQVg“,  
„grant\_type“: „client\_credentials“  
})

I really don’t know what to do. How can I make the api work and not always return either route not found or authorization grant is not supported?

---

<div class="post-metadata">

### Author: ![x2wr0](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@x2wr0](https://forum.shopware.com/u/x2wr0)
#### Post date: [5. April 2023 um 08:15 UTC](https://forum.shopware.com/t/the-api-always-returns-404-route-not-found/99190/2 "2023-04-05T08:15:21Z")

</div>

Hello,  
go to [this site (SW-API doc)](https://shopware.stoplight.io/docs/admin-api/f95b395c5ae73-list-with-basic-information-of-order-resources) and read the second line carefully… and you will find the mistake in the case for the „orders call“.  
The authorization error message is very descriptive: [„Check that all required parameters have been provided“ (SW-API oauth doc)](https://shopware.stoplight.io/docs/admin-api/ZG9jOjEwODA3NjQx-authentication).  
If you want more helpful information, provide more detailed infos (how you invoke the call, what’s your request/payload [but never ever give any private credentials, therefore it’s called „secret“! 😉 ).

~ x2
