Hi this is my first post so if I haven't formatted something correctly or am not on topic please let me know.
I need to use cURL to access a database and extract datapoints for each device stored in the cloud. My question thus far is how do I save the access token from this line:
`curl -X POST -d "<user><email>[email protected]</email><password>Passwordexample</password><application><app_id>anidexample_id</app_id><app_secret>asecretexample_secret</app_secret></application></user>" -H "Content-Type:application/xml" https://user.aylanetworks.com/users/sign_in.xml`
Into a variable.
So far I've used :
@echo off
set /p UserInput= Enter the Access Token:
@echo on
curl -H "Authorization: auth_token %UserInput%" https://ads-dev.aylanetworks.com/apiv1/dsns/AC000W000007000/properties.xml>TestFile.xml
This passes the token but it needs to be entered manually every time. I've tried to use set without needing user input and I haven't been able to get it working. Is there something that I'm missing with setting variables?
Any help would be greatly appreciated,
DM