Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

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

oAuth 'library' or solution for use in Alteryx workflows?

anthony
11 - Bolide

Does anyone have a workflow/macro for using oAuth for User Authentication to APIs?

 

Even a third party app I can use with Run Command tool?

 

Or anything you can point me to so I can get access to API's with download tool that use oAuth?

 

Thanks,

Anthony

 

10 REPLIES 10
MarqueeCrew
20 - Arcturus
20 - Arcturus

Isn't the API for Twitter oAuth?  You might want to check. 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
danielbrun2
ACE Emeritus
ACE Emeritus

Hi Anthony,

 

Could you maybe give a bit more info on what you try to achieve and what API you are trying to connect to?

 

I have build multiple oAuth applications in Alteryx. Depending on the need I start the flow after having received the token and onwards. Does that suit your need?

 

All the best,

Daniel

rahuls
9 - Comet

OAuth varies for different APIs, so you have to develop a workflow pertaining to the API you want to use. For example, I made macros to get google sheets directly in Alteryx Workflow and Google uses concept of ClientID ClientSecret and RefreshToken to generate a shortlived access token. I made my workflow for that, some other API, like Facebook's would do it differently.

anthony
11 - Bolide

Sorry for the delay in followup. I was able to get my immediate need resolved without oauth - But I keep running into new issues with different services and I guess because of the various ways oauth is implemented is why the confusion/frustration.

 

I have reviewed the twitter solution and it seems to make sense but fairly complex with base64 encoding - is this required on all multi leg oauth?

 

Today I discovered the header X-Shopify-Access-Token was needed for shopify but it worked without it - just gave me a 401 for the first few hits when using the user/pw(token) for a private app. Once I added token to header the 401 went away.

 

rahuls would you be willing to share your google sheet solution or at least the steps for setting up?

 

I think the steps would be a big help in clearing up my confusion.

 

Regards,

Anthony

rahuls
9 - Comet

@anthony

 

Given below is a link to the facebook connector of Alteryx which uses the OAuth process and documentation of how to use it.

 

Connector : https://gallery.alteryx.com/#!app/Facebook-Connector/56388700aa690a17f07733c1

Documentation: http://www.grazitti.com/blog/alteryx-facebook-connector/ 

 

This should get you going.

anthony
11 - Bolide

Thanks - I will take a look at the api and compare to your solution. It looks just like the way i would expect it to work - pass key/secret and get back a token to use for future calls.

 

But some of the ones I have come accross, they what all the header info which makes it a lot more confusing/complicated - or it is just me.

rahuls
9 - Comet

Got it, for the facebook connector, I am not passing anything in the header (in Download macro), I am passing all values in the query string itself. 

You might want to try that way and see if it works.

johnd2202
7 - Meteor

I know this is an old post, but wanted to share an easy way to gain access to a Shopify site using Alteryx. This method can only be used for a private app in your own store. The public apps require an oAuth authentication method whereas the private apps do not. 

 

  1. Create your private app in your store. You can Google how to do this if you don't know how.
  2. Using a Text Input tool, Create three fields which will have your URL, API Key, and Password. The URL will be formatted like "https://YOUR SHOP NAME.myshopify.com/admin/products.json" (The products.json is just an example of one of the API options they offer. Read their API docs for more options.)
  3. Once you have the credentials, use a formula tool and input a formula that will concat the API Key and the Password fields with a colon in between. For example, [API Key]+":"+[Password]
  4. Now you need to encode the concatenated fields using the Base64 Encoder tool.
  5. Next step is to use another formula tool and concat the word "Basic " and the Base64 encoded field with a space and name the field "Authorization." The result should look something like this. "Basic NjJjGEa1MjEwMDZM2FlMGVlMTA="
  6. Now you're ready for the Download tool. Select the URL field as your URL in the Basic tab of the download tool and select the Authorization field in the Header tab.
  7. Run the workflow and you should have a successful connection to your store.

Alteryx coupled with Shopify can be incredibly useful. I have attached a basic example workflow just in case my directions were hard to follow.

anthony
11 - Bolide

John thanks. I was able to get into shopify a few years back with private app but was looking for a way to use alteryx and oath. I have not had a need for that solution recently so have not bothered to figure it out.

 

Your basic auth is easier than some header and curl user/pw solution i was able to figure out.

Labels
Top Solution Authors