Forum Discussion

jodydowling's avatar
jodydowling
New Contributor
5 years ago

Missing header

When submitting a request with an Authorization header, it seems to be stripped out when it is received.  Message returned is "Bad Request: The authorization header is null or empty or isn't bearer. ...
  • richie's avatar
    5 years ago
    Hey jodydowling,

    So the request doesnt even include the Authorization header, not that the value is blank, right?

    Well thats a new one on me.

    Can you clarify the authorisation scheme being used in your request? Basic auth? OAuth?
    When you use (for example) basic auth, the Auth header is dynamically created based on (if i can remember correctly) a base64 encode of the username and password. If for some reason the Authorization header isnt being generated or the value isnt being generated you can hard code the Authorization header (along with the value) to force the presence of the missing Auth header in your request.

    When you add the header, make sure you spell it correctly or it wont work.
    The reason im saying this is that (im british and you spell Authorization as Authorisation...however, the headers spelling is US english....spelled with the 'z'

    Ok, thats it. Force the presence of the header by actually adding an Authorization header and you should be golden!

    Nice one,

    Rich