We are updating the requirements for Community registration. As of 7/21/21 all users will be required to register a phone number with their My Alteryx accounts. If you have already registered, you will be prompted on your next login to add your phone number.

Alteryx Designer Discussions

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

API's, Download Tool, and Basic Auth Oh My!!

smoskowitz
12 - Quasar

Hi All --

 

I have been struggling with this issue for quite some time. I have a work around, but it no longer will be usable.

 

I have had a series of API's built for me that get information from an internally developed system. I take the URL for a particular API and put int into Postman. I then choose Basic Auth add enter my domain credentials. Postman then returns the data without any issue.

 

I first tried putting the same URL and credentials into Alteryx and running the workflow. When I run the workflow, I always receive the below error:

 

smoskowitz_0-1613585662129.png

 

However, if I go into Postman and copy the the Basic Auth and put it into Headers of Alteryx -- Viola that works. It has come to my understanding that header is sort of unique to me and if my coworker now puts his domain credentials into Alteryx and tries to run the same workflow -- it fails with an unauthorized error.

 

smoskowitz_1-1613585750689.png

smoskowitz_2-1613585786274.png

 

The question now becomses, how do I do what Postman automatically does for each user? If a user puts in their username and password, how do I generate and pass that to the URL's API so I can retreive data and more importantly -- so others can so as well.

 

Thank you for your help.

 

Seth

3 REPLIES 3
smoskowitz
12 - Quasar

Hi again!

 

I found this article from @TashaA and it gets me close.

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Guide-to-Creating-Your-Own-Connecto...

 

smoskowitz_0-1613595785898.png

I can't seem to figure out how to set up the formula correctly. Below is what I did:

 

smoskowitz_1-1613595906635.png

I then Base64_encoded it and added Basic to the front of it.

 

smoskowitz_2-1613595966755.png

 

Then in the download tool:

 

smoskowitz_3-1613596005977.png

 

However, I still don't get back any information. I receive a:

 

HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Wed, 17 Feb 2021 21:00:27 GMT
Connection: close
Content-Length: 311

 

Any assistance would be greatly appreciated.

 

Thanks,

Seth

smoskowitz
12 - Quasar

I figured it out! I needed to remove credentials from the Connections tab.

 

 

TashaA
Alteryx Alumni (Retired)

Nice job @smoskowitz !

Labels