Free Trial

Alteryx Designer Desktop Discussions

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

Alteryx DCM usage within the Download Tool (for generic API authentication)

markspivey
6 - Meteoroid

I'm working on updating an existing set of projects where I need to use the Download Tool in Alteryx to access various APIs, and wanted to securely store the credentials in DCM, rather than having them sit insecurely within the Download Tool itself. We can use access to the Okta API as an example, whereby the Okta API requires an API key which is typically passed in the HTTP headers as part of an API GET request. My goal is to securely store the API key and manage it through the Data Connection Manager (DCM).

 

I've set up DCM and understand how it can store and manage credentials like username/password pairs and specific methods for AWS and Azure services. However, I'm having trouble understanding how to use it for storing and managing generic API keys or credentials, which don't fit into these pre-existing categories.

 

In my Okta example, the Download Tool needs to be configured under the Headers tab to push a Name and Value for authentication purposes, which for Okta looks like this:

 

Name: Authorization

Value: SSWS {apiKey}

Raw: Authorization: SSWS {apiKey}

 

My issue is figuring out how to store this API key in the DCM and how then to reference that secret/variable in the Download Tool. Has anyone used DCM for storing generic API credentials specifically for use within the Download Tool for API access?

15 REPLIES 15
Sakeen
5 - Atom

Hi bkclaw113,

 

I hope you're doing well. I came across your answers to the problem in the "Alteryx DCM usage within the Download Tool (for generic API authentication)" article, and find it highly interesting.

 

Could you kindly send me a screenshot or let me know where to insert the grant_type = client_credentials parameter?

 

Your assistance would be greatly appreciated.

 

Regards

Sakeen

ayx104997
5 - Atom

@bkclaw113 
If possible can you please help us with the screenshot of the configuration of the download tool, basic header and payload tabs Also, please let us know how you encrypted the key. 

bkclaw113
9 - Comet

Odd, I could swear that I posted those pictures yesterday in response to @Sakeen  but I do not see them anywhere. Hopefully it works this time.

Also here is a good post on doing Basic Authorization that is used in many API's - https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/API-Basic-Authorization/td-p/7... 

 

bc2c5838-cf28-4653-ac26-a0afffdd541e.pngHeader TabHeader TabPayload TabPayload Tab

noel_navarrete
6 - Meteoroid

Was wondering if you are getting a DCM Tag error when using "{dcm:password}" as Value in the Payload tab in the download tool...

 

I am trying to use DCM, but I am seeing that the {dcm:password} alias when used in the Payload tab causes the error. I followed the documentation for the Download tool (screenshot attached) but had no luck, maybe I missed something.

 

Removing the client_secret from the “From the following constant values” and ticking client_secret in “And values from these fields” the workflow runs fine.

 

Any help is much appreciated. 

 

 

bkclaw113
9 - Comet

@noel_navarrete , what version of Alteryx are you using. I saw that there were some changes to the Download tool in 24.1, and I have not tested any of what I described against those new changes

 

"Download Tool Updates We’ve extended the support for DCM tags resolution in the payload for POST requests inside the Download tool. Also, there’s added support for Base64 encoding of header and payload values (or selected parts of it) inside the Download tool."

 

 

Also have you tried using Content-Type (on the payload tab) of application/x-www-form-urlencode? That is what I typically use.

noel_navarrete
6 - Meteoroid

thanks for the quick revert.

unfortunately we are still on 22.3.

I did try that "application/x-www-form-urlencoded" setting but i still get that DCM Tag error. 

I will try to download and use the latest designer version, but wont be of any use as our gallery is still at 22.3

 

Cheers!

Labels
Top Solution Authors