Authentication token request .. curl error

Hi,

Using the Notecard In-Browser Terminal, I issued the following command:

curl --request POST --location ‘https://api.notefile.net/auth/login’ --data ‘{“username”:"[me@myemail.com]",“password”:"[myPassword]"}’

I receive this error message instead of the expected token:
missing ‘req’ field specifying the type of request {io}

Any idea of what I’m doing wrong?

Also, can this command be issued from a console terminal? (Workstation is Debian Linux)

regards, Rich …

Hi Rich,

The in-browser terminal currently only communicates with a connected Notecard whereas curl is a ‘unix’ command. Thus you’ll want to open a Linux, Mac, or Windows WSL terminal.

Alternatively, you could use an online tool like POST notehub token request to craft the POST request and to send it.

Thanks for coming to the forum with this question. We’re currently working on making this more user friendly in the future.

-Carl

1 Like