Api call HTTP Headers

Schermafbeelding 2022-02-06 om 22.38.40.png

Hello guys,

I'm desperate.. 3 days and it still doesn't work.. 

So: 
I simply want to make an post api call from my app to factuursturen.be. 
Easy as that.. But is still get a 401. 

So i think i did something wrong... I try the connection in the terminal an evertything works perfect  (curl) 
 what do i nee to set in my HTTP Headers (i just copy and pasted it..(his is not my real key., but it is demo code) 
Authorization: "Basic JGJhc2U2NGVuY29kZWRTdHJpbmcgPSBiYXNlNjRfZW5jb2RlKCdjYXJnb3ZpbGxUcnVja3dhc2g6alZaRzhwT1MzVXBNc3VExUklldicpOw=="

(his is not my real key., but it is demo code) 

This is the documentation of factuusturen.

Schermafbeelding 2022-02-06 om 22.18.25.png

so can somebody say what i do wrong? Because it works in curl/terminal.. 

thank you so mutch guys! 

Solved Solved
1 5 1,252
1 ACCEPTED SOLUTION

You should just encode the actual username and password string itself, the rest of that is PHP code.

 

Marc_Dillon_0-1644416562634.png

 

View solution in original post

5 REPLIES 5
Top Labels in this Space