Skip to main content

I have an API with the following documentation:

https://baseball.help.trumedianetworks.com/baseball/data-pro-api-docs

 

According to the API documentation, a token must be generated and included as a parameter. This is done using a master token provided by the supplier. When testing in Postman, I receive a response in CSV format; however, the same does not work in TimeXtender. In Postman, the request automatically generates a header "cookie" containing an access token (through redirection).

 

Is it possible to use a cookie container with a redirect option? In cases where a query is redirected to another URL and an authentication cookie obtained from the original URL needs to be set in the redirected request?

 

If so, is this option available in TimeXtender's REST or RSD functionality?

Hi @DylanW. 

 

How is it returned in Postman?

As a header called cookie something with values, or as a cookies file.


Hello Thomas,

The system generates an access token, which is stored in the cookies section and also included in the headers (though this part is hidden). It appears that the user must log in to obtain the access token, which is then retained by the system.

Please let me know if you have further questions.

 


How would you then use this cookie in the next postman call?


Hi @DylanW. 

Which version of TimeXtender are you using?

The product team have looked into your issue, and informed me that it seems that you can get json data from the endpoint. This might be preferable since Json would be consumed easily by the connector.

According to the API documentation, it does not appear that Authentication requires the use of cookies since cookies are not mentioned in the documentation. It might be necessary to setup an endpoint that posts to the token url, gets a token. Then that token should be used as a query parameter in the actual data request.


@Thomas Lind  You cannot manually generate the access token; it is created automatically. It works similarly to logging into a website, where the browser stays logged in using cookies. The master token provides a temporary "login token." Once logged in, a redirect creates a cookie that holds the access token, which is automatically generated and retained as a cookie.

@Christian Hauggaard  I understand. I'm using the latest version of TX. Unfortunately, the documentation is lacking, which is why this information isn’t mentioned. The JSON data is poorly structured, which led me to choose CSV instead. However, this doesn't resolve the issue with the cookies.

I know this is a very poor API and it look a little bit like this:

 

  •  


Hi @DylanW. 

The reason for all my questions is that, there is not an existing method for automatically using specifically cookies for gaining access.

You will need to either get the necessary info from a header or use an endpoint to generate it.

If you have seen the Exact guide you also know that getting the OAuth setup done is pretty difficult and requires a lot of steps that is not being done in our program but in external ones like Postman.

Do you know if we can get access to the baseball info API?


Hi @Thomas Lind

Thank you for your quick response. I understand that we will need to retrieve the necessary information from a header.

Unfortunately, I’m unable to share access information for this API due to client regulations.

After discussing this API internally, we’ve decided to use a different tool to obtain this data.

Thank you for your support.


Reply