Authenticate API calls in R

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?

Parents Reply Children
  • Former Member
    Former Member $organization in reply to Vilius Sepstas

    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". 

    1. The UserName field is set in the Users table of the Tessitura Security Module.
    2. The UserGroup field is also set in the Tessitura Security Module.
    3. The MachineLocation field is set in the TX_MACHINE_LOCATION table in Tessitura.  You can add your machine name or pass any existing machine name from that table. From an API perspective this is simply an audit column, but it is checked against that table at authentication.
    4. The password is created for the UserName in the Users table of the Tessitura Security Module. The checkbox for "User must change password at next login" must not be checked!
      1. NOTE: the user type defaults to "user".  Set the type to "api" to prevent the password from expiring.
  • Former Member
    Former Member $organization in reply to Steve Barnhouse

    Bravo Steve.  Much more eloquently stated;