• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support SmugMug APIs, Hacks & Tricks getAccessToken = "invalid/expired token"

FAQtoid

Ever wanted to create an Avatar? Creating an Avatar!

Searching Dgrin with Google Searching with Google

Dgrin Challenges

Congratulations to the Winner of DSS #128 (Sunrise or Sunset), ShootingStar.

The next Dgrin Challenge DSS #129 (Silhouette Revisited ) is open for entries through May 27th, 2013 at 8:00pm PDT.

As always, we look forward to your participation but please do take a moment to read through the rules before posting your entry.

Past DSS Challenge Winners, DSS Challenge Rules, and other important DSS Challenge information is here.

Need some help with Accessories?

Tutorials

Ever find yourself wondering just how someone managed to create an image using different effects?

Here are three simple tutorials we hope will encourage you to try something new.

The Hot Seat

A lifelong interest in landscape photography has led Eyal Oren to make a study of his adopted hometown of Marblehead, MA. As you can see, his dedication is paying off!

Africa!

Dgrinners Harryb, Pathfinder, and others joined Andy Williams and Marc Muench on Safari in East Africa recently. Here are some awesome threads to check out!

 
Thread Tools Display Modes
Old May-14-2012, 10:17 AM
#1
Erg is offline Erg OP
Beginner grinner
getAccessToken = "invalid/expired token"
Hello, I applied for an API Key yesterday, and it shows up on my control panel page. However, when I try to use it (using c#+json api 1.3) getRequestToken returns without error, but getAccessToken always returns "invalid/expired token". Does it take a while for the API Key to become valid? If not, any ideas?

Thanks.
Old May-14-2012, 10:58 AM
#2
MSkaffari is offline MSkaffari
SmugMug Product Manager
MSkaffari's Avatar
Quote:
Originally Posted by Erg View Post
Hello, I applied for an API Key yesterday, and it shows up on my control panel page. However, when I try to use it (using c#+json api 1.3) getRequestToken returns without error, but getAccessToken always returns "invalid/expired token". Does it take a while for the API Key to become valid? If not, any ideas?

Thanks.
Have you authorized the request token? Do you see the app in "authorized applications" section of your control panel?

http://wiki.smugmug.net/display/API/OAuth
Old May-14-2012, 11:27 AM
#3
Erg is offline Erg OP
Beginner grinner
Quote:
Originally Posted by MSkaffari View Post
Have you authorized the request token? Do you see the app in "authorized applications" section of your control panel?

http://wiki.smugmug.net/display/API/OAuth
Thanks MSkaffari, no I do not. This is all I see. Do I need to "authorize" the app myself somehow?

Old May-14-2012, 12:29 PM
#4
MSkaffari is offline MSkaffari
SmugMug Product Manager
MSkaffari's Avatar
Quote:
Originally Posted by Erg View Post
Thanks MSkaffari, no I do not. This is all I see. Do I need to "authorize" the app myself somehow?

After getting the request token, you have to forward the user to ../authorize.mg with the request token. This step will let the user to Authorize the app to access their account. If you skip this step the system will see the token as invalid and won't let you proceed.
Old May-15-2012, 07:44 AM
#5
Erg is offline Erg OP
Beginner grinner
Quote:
Originally Posted by MSkaffari View Post
After getting the request token, you have to forward the user to ../authorize.mg with the request token. This step will let the user to Authorize the app to access their account. If you skip this step the system will see the token as invalid and won't let you proceed.
Ah, I guess it would help if I understood oauth before I dug in :). Anyway, thanks for pointing me in the right direction. I got it working by simply pasting the request code into the authorize URL, then getting the access token and hard-coding it into my app. This is for my own small utility program, so that's all I needed.

Thanks for your help!
Tell The World!  
Tags
api
Similar Threads Thread Starter Forum Replies Last Post
Question about oAuth GetAccessToken suntsu SmugMug APIs, Hacks & Tricks 4 Oct-06-2011 09:49 PM


Thread Tools
Display Modes

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump