Got it work now. The issue was that my token had a special characther "=" so I had to encode it before.
encoded_token=$(printf '%s' "$token" | jq -sRr @uri)
Thanks for your help!