Sending a GET request

#1

Hi everybody,

Congratulations on the successful launch.

I was wondering if you could help me debug the following GET request:

=GET("https://api.mixnode.com/queries",'[{"Authorization": "Basic XXXXXXXXX"}]')

I get: #FAIL! headers: Invalid JSON

#2

Hi Nariman :wave:

if you leave out the [ ] in your header, then it should work :grin:

Here you go:

=GET("https://api.mixnode.com/queries",'{"Authorization": "Basic XXXXXXXXX"}')

Pro Tip: use PAIR2JSON to build your headers :point_down:

A1 = Authorization
A2 = Basic
A3 = XXXXXXXXXXXXXX
A4 = A2&" "&A3
A5 = PAIR2JSON(A1,A4)
A6 = GET("https://api.mixnode.com/queries",A5)

Your PAIR2JSON will build the header for you:

45

Let me know if you encounter any further problems!

Happy building :construction_worker_man::construction_worker_woman::building_construction::construction:

:vulcan_salute:

3 Likes