Hey,
Does anyone know how to authenticate API calls in R using httr package?
I am getting 401 error when calling:
GET("">rodnapp.tessituranetworkramp.com/.../Titles", add_headers('admin:admin:location:password'))
header is off course base64 encoded and what I wrote above is just an example.
What am I missing?
I'm not familiar with R, but it looks like your header doesn't have a key, for the value. The Rest API will look for the base64 value you're creating in the "Authorization" header
Where do I get the key? I am not sure if I understood correctly.I have passed Authorization header in base64 format.
The rest API uses Basic Authentication and should be formatted accordingly;
Authorization: <type> <credentials>Where type is Basic and credentials are a base64 of admin:admin:location:password
Just to elaborate a bit on what James said, here are some notes I made about authenticating the api:
Each REST API call must be authenticated with a username and password. The username consists of three fields concatenated together: "UserName:UserGroup:MachineLocation".
Bravo Steve. Much more eloquently stated;