Inspire EMEA 2022 On-Demand is live! Watch now, and be sure to save the date for Inspire 2023 in Las Vegas next May.

Engine Works

Under the hood of Alteryx: tips, tricks and how-tos.
TashaA
Alteryx Alumni (Retired)

In my previous post about getting started with REST APIs, we walked through some basic setup of connecting to and executing a request to the Quandl API. The next few posts in this series will take a deeper look at things like authentication, payloads, and using batch macros for downloading or submitting data. 

 

Bearing in mind that RESTful style APIs will have a different implementation of OAuth 2.0 or another authentication method, there are some key words that you can look for in the API documentation that you are using that will help you quickly choose the appropriate grant flow to use in Alteryx. The main thing to look for is an endpoint to send your client id/secret, or username/password to, in exchange for an authorization or access token. This helps you avoid getting caught up in any grant flows that require you to redirect to a web application for authentication. 

 

Resource Owner Password 

This grant flow requires the passing of the username and password in exchange for authorization. 

Resource Owner Password.png

 

Client Credentials/Client Authentication

Very similar to the Resource Owner Password flow above, but without the username and password added to each request. This grant flow means that you have registered an application with the API (to be referred to as the Client) that has access to resources that you are the owner of. In this case you are the client as well as the user. I am currently working on developing  a connector for Adobe Analytics and their documentation provides a diagram that shows their implementation of this flow, as well as others. 

 

Adobe Analytics.png

 

Basic Authentication

The implementation of this usually looks like [clientid:clientsecret] or [username : password] base 64 encoded and then prepended with "Basic" as the value for the header "Authorization".

 

Basic_auth.png

 

API Key 

Mentioned in my last blog post, Quandl allows you the ability to simply generate an API key tied to your account that you can use to access the API. This is more commonly seen in APIs where you are not accessing any user specific or sensitive information. 

 

 Quandl.png

  

Debugging

The API you are working with may have a testing console in their web application in the developers section that will allow you to test your API requests, but there are some other things you can do to help troubleshoot the requests that you are sending through the Download Tool. 

 

PostMan

PostMan is a Chrome application that many members of the Content team here use to construct and test API requests including authentication/authorization prior to implementing the request in Alteryx with the Download Tool. This allows you to explore the format of the url, payload, and other things that will help you understand the format needed to apply to your workflow. 

 

Postman.png

 

 

Fiddler

If after transititioning your request to a workflow format in Alteryx, you may find issues executing the request and want a better look at what is going on. Fiddler will allow you to capture your outgoing and incoming HTTP traffic so you can inspect the request to see if there is anything out of place in your request.

 

If you are looking for some recommendations for APIs to get started with, or find out more information about an API try out Programmable Web.  Here you can search by protocol type as well as subscribe to API changes-extremely helpful if you plan on utilizing specific API connections as part of your daily or weekly business functions. 

 

Do you have any helpful tips or tricks on getting different grant flows/authorization to work in Alteryx? Share them in the comments!

 

 

Tasha Alfano

Tasha loves working with Alteryx products, building time-saving tools, and talking to customers! When she isn't at the Colorado Alteryx office, she's usually running or biking on a trail nearby. Twitter: @Tasha_Alfano

Tasha loves working with Alteryx products, building time-saving tools, and talking to customers! When she isn't at the Colorado Alteryx office, she's usually running or biking on a trail nearby. Twitter: @Tasha_Alfano

Comments