Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Python, Jupyter and Rest API with Auth0

MarkBurns
7 - Meteor

Hi 

 

New Alteryx user here!  Just dipping my toe into the world of workflows and I have to say I like it so far!

 

I'm trying to get some CRM data from an Auth0 Rest API, and searched the community and found this Zoom rest API into Alteryx as a possible solution to get the bearer token

 

Not sure if I've gone down a rabbit hole but I've done the following

 

  • Installed Python 3.8
  • Installed Jupyter and was able to connect to the local host and execute the following
    • import pandas as pd
      data = pd.DataFrame({"text": ["Jupyter", "by", "itself"], "number": [1,2,3]})
      data

When I'm back into Alteryx (Non-Admin Designer) Version: 2021.3.1.47945, the Jupyter notebook doesn't open. I have try

 

  • Run Alteryx in admin mode
  • Edit Internet Options and enabled proxy, pointing at local host (now removed as it didn't work)

 

My question is, do I need to use Python to obtain the Bearer Token for API call or is there a different way to do it?  If I do need python then why doesn't the notebook open - have I missed some configuration option.

 

At the moment my workflow only consists of Python tool, so not much to share.

 

I have managed to connect Alteryx to the Public API and process the JSON data into a usable form....

 

Any suggestions or signposting.

 

Thank You

 

Mark

 

 

 

 

17 REPLIES 17
TheOC
15 - Aurora
15 - Aurora

hey @MarkBurns !

Quite a cool workflow you're working on!

Couple of questions here so i'll try to cover as much as i can methodically.


1) do I need to use Python to obtain the Bearer Token for API call or is there a different way to do it? 

  • As always in Alteryx, theres not just 'one way' to do something.
    • I would say that the most common way to do API requests within Alteryx would be using the download tool. I'm not familiar with the API you are using, however i would suggest by the sounds, doing a get request to the auth endpoint to get a token, and then send that token into another download tool to carry out the request you want to do, is a perfectly viable other way of doing this
    • Theres also the R tool - if you're comfortable with R you can easily connect to API's
    • Or, Python /Jupyter Flow tools - with the method you are going with
  • All are perfectly viable - and i think often there are limitations/strengths to each. If its a workflow only I will be using, i often opt for Python as I like how limitless it can be. However, if i was ever going to share the workflow, i always opt for Alteryx as its easier for someone to pickup.

 

2) If I do need python then why doesn't the notebook open - have I missed some configuration option.

 

Hope this helps!

TheOC


Bulien
MarkBurns
7 - Meteor

Thank TheOC

 

Yeah really excited about the potential of Alteryx and how I can use it to pull student engagement data (work in Higher Education) join that with Academic data and then present the whole out into an interactive Tableau dashboard! 

 

  1. Glad to know that I'm on the right track with Alteryx / Python combo,  I used the Download tool to get the public API data was so impressed how quickly I got it working, mostly because I could see the example from the community!
  2. So here's a screenshot , I haven't connect the Python tool up to anything as was expecting to see the Browse Notebook option

MarkBurns_0-1638891116828.png

 

This is the sample Notebook

 

MarkBurns_1-1638891191374.png

 

Thanks for the link, I'll have a read after I grab a cuppa and suspect that the issue that I'm using a corporate network and something funky is happening in the background - might be my VPN thinking about it!

 

Cheers

 

Mark

 

 

 

TheOC
15 - Aurora
15 - Aurora

hey @MarkBurns 

Yeah the download tool still is one of the most impressive tools to me. Its just nice opening doors to API connections in a shareable, easy to use format in the sense of Alteryx. Showing someone code who has never used code before is a difficult task.

 

Also yeah thats curious, you might well be right with VPN issues - i believe it mentions VPN/proxy as a potential issue within the article. Let me know how you get on!

Cheers,
TheOC 


Bulien
MarkBurns
7 - Meteor

Ok will do,  had a brew and looked at ..

 

Worked though that guide and still no joy!

 

  • Changed Proxy settings in Alteryx under User / Advanced
  • Changed Local Internet Options
  • Looked for Jupyer_server.log on my laptop as recommended by this post, didn't find the log file
  • added this  to the runtimeSettings.xml  and watched the folder to see if a log file was created - it wasn't

 

So I think either the Juypter extension in Alteryx hasn't been installed correctly or it might not be there alternatively so thing else that I'm not sure how to check for.

 

Looking at the CMD from Jupyter I can see that activity happens when I browse the webpage but nothing when I click on the Python tool, which makes me suspect that Alteryx isn't even making the call.

 

MarkBurns_0-1638895718154.png

 

Feels like I missing something obvious  although I am a bit out of my depth here.

 

Mark 

 

 

apathetichell
19 - Altair

One quick note with the Download tool - which more knowledgeable people ( @TheOC @BrandonB et al) may chime in on - I find connecting via Postman and then recreating the connection parameters EXACTLY really helps. This means getting the raw Curl from Postman and hardcoding whatever values (content_type, host, etc...) until you get it to work.

TheOC
15 - Aurora
15 - Aurora

@apathetichell postman has saved me atleast a headache a month 😁 Definitely +1 to that method!


Bulien
MarkBurns
7 - Meteor

So do you think that I could split the process into two functions both using download tool?

 

1 - Download the bearer token

 

then pass it to 

 

2 A separate download tool?

 

Mark 

TheOC
15 - Aurora
15 - Aurora

Hey @MarkBurns 

Sorry to hear you're still having problems with the Python tool.

I've seen a couple other things on the community saying run as administrator, or reinstalling Alteryx might fix.

I'll try to have another look and get back to you!


Bulien
TheOC
15 - Aurora
15 - Aurora
Labels