HTTP Connection - Custom Authorization Header
Hello,
I have a an HTTP Connection that needs a Custom 'Authorization' Header in the form of:
'Authorization': 'Token <token>'
This works fine in postman.
In IO, I don't believe I can use the Token Auth as the Authentication Type with the 'Token '
When I try to include extra characters before the handlebar expression ('Token {{connection.http.encrypted.token}}') I get an error relating to not being able to find the key:
Cannot use 'in' operator to search for 'brick' in ******"
I also tried setting the http.connection.encrypted.token value to include the 'Token ' prefix. In this case I get an error that the token cannot contain a space.
I don't believe there is a handlebar to concat strings, and even so I think I would get the same token containing a space error.
Any thoughts appreciated!
Comments
Not saying this will work... but you could try the Join helper.
{{join " " "Token" http.connection.encrypted.token}}
I'm not sure if the connection token is available in that context or not. That helper in the dev playground gives the output you want.
Thanks David Gollom, I forgot there was a JOIN helper.
At first, IO wasn't pulling the field at all and would just send "Token". After playing around with IO being finicky, I noticed that somehow the encrypted fields were getting corrupted when I changed other settings. So I re-entered the encrypted token and updated the settings in one go and the connection now seems to be working.
Good to know you got it working!!
Please sign in to leave a comment.