Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Server Discussions

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

Server API call to generate refresh token

medelinski
Átomo

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 RESPOSTAS 3
sdunay65
Átomo

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
Átomo

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
Átomo

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