The Api always returns "404 route not found"

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?

Hello,
go to this site (SW-API doc) 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).
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“! :wink: ).

~ x2