CURL API create and logout fails even with su cookie
thmi
Registered Users Posts: 1 Beginner grinner
Hi, I was wondering if there was someone that uses curl with the API to create Categories, Album, Subcategory, ..
I read the post in regards to the cookies and I get a cookie upon login and send it again, but I sill get an invalid session error on any create operation
here is the sample code I use with
BASEURL="https://secure.smugmug.com/services/api/rest/1.2.2"
curl -c smug_cookie.txt -k -A "$UA" -s "$BASEURL/?method=smugmug.login.withPass
word&EmailAddress=$EMAIL&Password=$PASSWORD&APIKey=$APIKEY"
curl -b smug_cookie.txt -k -s -A "$UA" "$BASEURL/?method=smugmug.logout&Session
ID=$SID&APIKey=$APIKEY"
curl -v -b smug_cookie.txt -k -A "$UA" -s "$BASEURL/?method=smugmug.categories.
create&SessionID=$SID&NickName=$NickName&Name=$CATNAME&NiceName=$NICECATNAME=&Un
ique=1&Pretty=1&APIKey=$APIKEY"
any help would be great
I read the post in regards to the cookies and I get a cookie upon login and send it again, but I sill get an invalid session error on any create operation
here is the sample code I use with
BASEURL="https://secure.smugmug.com/services/api/rest/1.2.2"
curl -c smug_cookie.txt -k -A "$UA" -s "$BASEURL/?method=smugmug.login.withPass
word&EmailAddress=$EMAIL&Password=$PASSWORD&APIKey=$APIKEY"
curl -b smug_cookie.txt -k -s -A "$UA" "$BASEURL/?method=smugmug.logout&Session
ID=$SID&APIKey=$APIKEY"
curl -v -b smug_cookie.txt -k -A "$UA" -s "$BASEURL/?method=smugmug.categories.
create&SessionID=$SID&NickName=$NickName&Name=$CATNAME&NiceName=$NICECATNAME=&Un
ique=1&Pretty=1&APIKey=$APIKEY"
any help would be great
0