You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ret = smugmug.albums_create(Title="API Test 5")
smugmug.images_upload(AlbumID=ret['Album']['id'],File='/Path/To/Image.jpg',Caption='Test caption')
The JSON response from the server when I print it out is:
{u'stat': u'fail', u'code': 1, u'message': u"We're sorry, but you don't appear to be logged in to that account. Please login and try again."}
What am I doing wrong or is this a real bug? I thought my call to "login_withPassword" was fine and it returns OK values. The albums_create() method works as well and the new album shows up in the web view of the account. The images_upload() method takes a while (so obviously it's sending the image), but then I get the error shown and the image never shows up.
Thanks!
The text was updated successfully, but these errors were encountered:
The following code returns an error when attempting to upload an image:
from smugpy import SmugMug
API_KEY = "legal_api_key_here"
smugmug = SmugMug(api_key=API_KEY, app_name="pje_uploader")
smugmug.login_withPassword(EmailAddress="email_here", Password="password_here")
ret = smugmug.albums_create(Title="API Test 5")
smugmug.images_upload(AlbumID=ret['Album']['id'],File='/Path/To/Image.jpg',Caption='Test caption')
The JSON response from the server when I print it out is:
{u'stat': u'fail', u'code': 1, u'message': u"We're sorry, but you don't appear to be logged in to that account. Please login and try again."}
What am I doing wrong or is this a real bug? I thought my call to "login_withPassword" was fine and it returns OK values. The albums_create() method works as well and the new album shows up in the web view of the account. The images_upload() method takes a while (so obviously it's sending the image), but then I get the error shown and the image never shows up.
Thanks!
The text was updated successfully, but these errors were encountered: