What are you passing in your Authorization header?
If you’re calling a kraken (v5) endpoint, it should to be “OAuth dfva8mebnd****8ss2l42wpm”
If you’re calling a helix (“new”) endpoint, you need “Bearer dfva8mebnd****8ss2l42wpm”
If that doesn’t help, which endpoint are you calling? Is it one which requires a particular scope? (you haven’t specified any)
Yeah, this bit of code doesn’t add two headers.
It adds an array of one header, then overrides that header with an array of one header.
So you get one header.
So both headers go in one array and you call setopt with CURLOPPT_HTTPHEADER once with the full array of headers