Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

How to create simple API call?

Hamder83
11 - Bolide

Hi 

I have create a simple API call getting my bearer token:

Hamder83_0-1640093878780.png


Then I wanna use my token to reach https://api.xxxxxx.io/v1/reporting/shipments/export 

From postman I have a bearer token auth:

Hamder83_1-1640093938326.png


With 2 headers:

Hamder83_2-1640093954883.png

 

and a simple body:

Hamder83_3-1640093972531.png




How do I fill these data into my download tool? 

Im sorry I have near 0 exp with api's, so please explain it as if I were a child, thank you 🙂 

3 REPLIES 3
Matt_D
10 - Fireball

Hi @Hamder83 

 

Your Bearer token will go into your headers but you have them hidden in Postman, unhide them and you will see that postman sorts this out of you, you just need to change the name of your Bearer token column (I'm guessing to something like Authorization dependant on the API documentation) and feed the token in via the download tool in the Payload Headers tab

 

payload.png

 

Matt

Hamder83
11 - Bolide

Hi @Matt,


I create an input:

Hamder83_0-1640096411233.png

 

And I append my bearer:

Hamder83_1-1640096427406.png



I add my cleintid and content type as I do in postman:

Hamder83_2-1640096454395.png

 

Hamder83_3-1640096463832.png

But I get this error:
"{"timestamp":"2021-12-21T14:19:15.354+0000","status":400,"error":"Bad Request","message":"JSON parse error: Unrecognized token 'createdAfter': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false'); nested exception is com..."

 

Matt_D
10 - Fireball

My bad @Hamder83 the headers should go into the Headers tab not your Payload tab . I've corrected my original reply.

 

Obviously you don't need to manually enter your clientid if it's in your data, just tick it in the headers tab or visa versa.

Labels