OAuth token is missing but token is added to the header

It seems I’m really bad at this. I keep getting the same error both ways. Maybe it would be better if I show you the whole function?