not sure if it helps you but i was getting this error with my python script using jwt and i had to decode the token to get rid of a b'' that was surrounding my token for my api connection to work.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Tags: