Hi, I’m using “curl” to add an inbound “file” to notehub.io - the notehub request follows the “Authentication” method as described in “using Notehub API/Authenticating”. Here’s the command – (in a Windows batch file). I use line extenders (^) to better view the command. I followed the “Programmatic API access” steps to create a “client id” and a “client secret key”.
curl -X POST -L “https://notehub.io/oauth2/token” -H “content-type:application/x-www-form-urlencoded” -d “grant_type=client_credentials” ^
-d “client_id=*************” -d “client_secret=**************” ^
-d “{"req":"note.add","file":"my-inbound.qi",{"command":"mycmd_6","id":"the_id6"}}”
The command returns what appears to be a “valid” a response. I shortened the “access_token” for readability …
{“access_token”:“zkXV2qR…KFZc”,“expires_in”:1799,“scope”:“”,“token_type”:“bearer”}
Upon completion, I expected an entry to be added in the Notehub/Events page (similar to Adding the note in the Devices page) – showing “my-inbound.qi” and data fields. Unfortunately, no entry is made.
Any idea of what I’m doing wrong? Do I need to create a route?
regards, Rich