using API from command line

14 views
Skip to first unread message

Anastassia

unread,
Mar 10, 2019, 2:23:20 PM3/10/19
to Dandelion Support Forum
Hello there,

I am just trying out Dandelion. It looks amazing with many possibilities. Unfortunately, I cannot understand how to make a command line request. The demo request call from the front page does not work: curl https://api.dandelion.eu/datatxt/nex/v1/ -d text='The doctor says an apple is better than an orange'
I played around with it and finally changed it to curl -i "https://api.dandelion.eu/datatxt/nex/v1/&text='The doctor says an apple is better than an orange'&token=MY_KEY" 

At least I get some sort of a response but still no decent results. 

{"error":true,"status":404,"code":"error.notFound","message":"API endpoint not found","data":{}} 

I would be very grateful for some help or guidance on how to make correct command line requests.

Thank you!
Anastassia

ber...@dandelion.eu

unread,
Mar 12, 2019, 12:47:37 PM3/12/19
to Dandelion Support Forum
Hi Anastassia,

I suggest you to start from the official documentation: https://dandelion.eu/docs/api/datatxt/nex/getting-started/
You should be able to perform a GET request with curl, e.g.:

curl 'https://api.dandelion.eu/datatxt/nex/v1/' -d 'text=My name is Trump&token=API_TOKEN'

where API_TOKEN is the value in your dashboard: https://dandelion.eu/profile/dashboard/

This simple command actually works

Regards

Giacomo Berardi
Dandelion team
Reply all
Reply to author
Forward
0 new messages