Avoid CORS errors and send credentials

i try to make a request to a api. i am getting a cors issue, so i tried to send the request over a server. but i also need a standard-basic-auth here and i cannot find where to set this data. in my example, i get back a

Cannot read properties of null (reading ‘reduce’)
message: “Cannot read properties of null (reading ‘reduce’)”

DOnt know how to work with this. can anyone help here?
i just want to connect to a shop system and get its orders.

mats

What API are you hitting? Can you share how you have your things set up?

i am using the ret api from shopware 5 to get orders from this shop system.
in postman, i just added a GET with a basic auth by user and pass.
when i use “without server” than it asks me for the data and it connects, but makes
an x-origin error.
when i try “send request over server” it dont asks and makes another issue.

its working well with postman.

with send credentials i get:

You gotta flip the switch for making the call from the server in the api connection setup.

i already did this and got the above issue with “cnnot read properties of null” - and i dont find a way to setuo the auth creds in “from server” configuration.

Can you show how you have them set up

what exactly? i screenshotted everything.
nothing else to configure…or do i dont see anything?

image

When I visit that site without sending auth credential as I get an error too.

Seems like you need to be sending auth credentials or a token or something. It usually goes in the header of an api request.

as i found out, i have to set a header “Authorization” and than ass BASIC and a base64 encoded string from user:pass . actually its still not working but that seems to be the way it works.