Skip to content

Instantly share code, notes, and snippets.

@drapp
Created September 19, 2012 19:20
Show Gist options
  • Save drapp/3751650 to your computer and use it in GitHub Desktop.
Save drapp/3751650 to your computer and use it in GitHub Desktop.
StackMob AccessToken methods
  • Regular login
GET https://api.mob1.stackmob.com/user/accessToken

Headers:
   X-StackMob-API-Key: <public-key>
   Content-Type: application/x-www-form-urlencoded

Body: username=<username>&password=<password>&token_type=mac&mac_algorithm=hmac-sha-1&redirect_uri=...
  • Facebook login
GET https://api.mob1.stackmob.com/user/facebookAccessToken

Headers:
   X-StackMob-API-Key: <public-key>
   Content-Type: application/x-www-form-urlencoded

Body: fb_at=<facebook token>&token_type=mac&mac_algorithm=hmac-sha-1&redirect_uri=...
  • Twitter login
GET https://api.mob1.stackmob.com/user/twitterAccessToken

Headers:
   X-StackMob-API-Key: <public-key>
   Content-Type: application/x-www-form-urlencoded

Body: tw_tk=<twitter token>&tw_ts=<twitter secret>&token_type=mac&mac_algorithm=hmac-sha-1&redirect_uri=...
  • Refresh login
GET https://api.mob1.stackmob.com/user/refreshToken

Headers:
   X-StackMob-API-Key: <public-key>
   Content-Type: application/x-www-form-urlencoded

Body: refresh_token=<refresh token>&grant_type=refresh_token&token_type=mac&mac_algorithm=hmac-sha-1&redirect_uri=...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment