Hi all,
I'm a new user to Alteryx, but had the bright idea to add an API call at the beginning of my workflow. Lord knows why, but I'm stubborn!
I'm trying to export data from an external system we use, and they use JWT. Their API details are here: https://api.geckoform.com/docs//#
I have been able to obtain the token, but have absolutely no idea how to actually then work that into the Download Tool I'm using. Any help on the steps I should take would be invaluable!
Thanks,
Matt
Solved! Go to Solution.
Hi there, you can refer to the two links below. If this helps, feel free to like the comment and select it as a solution
https://www.thedataschool.co.uk/ozlem-sigbeku/how-to-guide-alteryx-download-tool-txt-word-sleuthing/
Your authorization token needs to be of the form:Bearer <token> and the token should be Base64 encoded (Base64 Encoder in the Developer Palette if it is not already done).
Take a look at this for more info on that token.
Are you able to post your workflow and where you are up to?
The cURL example in the API-Docs is going to be the key one to look at:
Hi @EpicTriffid,
Here is couple of examples from one of my recent API workflows.
As @KGT also mentions "-h" means a header and i attached a screenshot of how that would actually be configured in the download tool. Just put "Bearer" followed by a space and then insert your token.
Make sure to choose the correct HTTP action GET/POST etc.
You can either choose to take your query from a field, this is super useful if you want to do multiple calls or just need a value from somewhere in your workflow that is not constant. You can also choose to just write your query directly in the the box, if that is easier.
Hope this helps you on your way :)
Hi again all, thankyou for the wonderful responses!
I have reached a point where no matter what i do, i can't seem to extract any data.
I have my end point saved as a Text Input: https://api-eu.geckoform.com/contacts?per_page=10. I then feed that into my download tool as the url.
For my headers I have the following:
Payload is set to GET, but nothing else (not entirely sure what to do with this bit).
After running, my output in DownloadData is "{"message":"Input JSON error - Syntax error, malformed JSON"}"
I was under the impression that the output should be the list of headers and some data that I then format into fields. What am i missing?
Do the download headers say Failed or something like that? Not sure if it's an error with the call or with the response.
Try removing the ?per_page=10. There's a chance that it's just an encoding issue. If you want that back on there, you can pass it as payload field called [per_page] with a value of 10.
I can't see where per_page is a valid parameter, but I didn't look that hard....
No luck with remove the "?per_page=10" I'm afraid. This is the output in Browse. The DownloadData is everything you can see, and I've expanded the DownloadHeaders to show the whole text:
Hi @EpicTriffid
The 400 error suggests there is something wrong with the format of the call. I've sometimes found that getting API's to work is often a case of trial and error.
One suggestion; remove the Content-Type header, and capitalise the A in accept, looking at the curl criteria its got a capital A in it - it shouldn't make a difference but i've managed to get calls to work in the past with something seemingly silly like that.
Another option to try if nothing is working is if you have/can get an App called Postman (https://www.postman.com/) and try seeing if you can get it working in there first as you can mirror the curl statements from the documentation
Without seeing the whole call, I'm not sure. Do you have a payload? If you can't share the workflow, can you share screenshots of each of the Download tool tabs?
YOU'RE AMAZING!
That was literally it. Removing content type and capitalising the A got my data coming through! Thankyou very much!
User | Count |
---|---|
106 | |
85 | |
76 | |
54 | |
40 |