Connect with a Microsoft R Server API

Hello everyone,

Currently, I'm trying to set up a connection between an API I've build using Microsoft R server and Klipfolio.

Microsoft R server (MRS) makes use of a so called 'Bearer'. This bearer is acquired through posting to a login URL. The response contains an access token and a refresh token. I know the API works: When I hardcode the access token into my API call in a datasource it works for a short while. But, the token expires. Calls to this API are made like this:

(In this example, the IP is fake)

Where {access_token} in the header should be the access token, preceded by the word Bearer.


I can call the login part of the API in a seperate datasource:

(I've hidden the tokens manually through the browser console for security reasons)

So, I tried several things;

- Setting it up as a dynamic datasource, setting the value of the Login API access_token as a variable value, and try reading that in the getWorklogs API call like this: 'Bearer {access_token}.
- Setting it up as a two-step authentication datasource. But I have no clue on how to get the access_token value and append it to the Bearer.

Does anyone have an idea on how to connect this datasource?

1 comment

  • 0
    Arshad Hayat

    Hi Steven,

    This looks possible through 2-Step Authentication.

    I don't have the details on what configuration you have set to get the access_token in the 'Rserver API - Login' data source above.

    You would use that in the Authentication part with

    Response = Text and

    Token Path = "access_token":"(.*?)"


    In the request, you can use this access token by referring it as [auth_token]


    Hope this helps.




Please sign in to leave a comment.