Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Server API call to generate refresh token

medelinski
5 - Atom

Hello everyone,

 

I was able to successful trigger a workflow on our server with an api call. The difficulty I've been having is trying to get the refresh token along with the access token. I have been trying this in postman and I would like to have a refresh token to not have to refresh the access token manually every time. Has anyone had success generating a refresh token along with the access token from the alteryx server api authentication? 

3 REPLIES 3
sdunay65
5 - Atom

Not sure if we are doing this same thing.  We are using: V22.X, API V1 Subscription OAuth2.  We have a simple Python wrapper that, via API calls, submits a workflow and then polls until it is complete - successfully or not.

 

If this is what you are attempting, I can share our code.  We also have an OAuth1 version.

medelinski
5 - Atom

Hi sdunay65, thank you for your response! I am trying this with the following api: v1/workflows/{appId}/jobs to trigger a workflow. Are you able to generate a refresh token as well with your python code? If you could share it that would be amazing. thank you!

sdunay65
5 - Atom

code snippet is attached.

 

You will of course need to provide your API key, secret and the Alteryx URL you use.

 

We call this from a Windows command line via a bat file - via our enterprise scheduler Redwood

 

ex. python AlteryxAPIWorkflowSubmit.py --app_id=627ad360xxxxxxxxxxxxxx9f9