Skip to content

Instantly share code, notes, and snippets.

@jpmhouston
Created March 2, 2015 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpmhouston/7b53d74149dbb47f47fd to your computer and use it in GitHub Desktop.
Save jpmhouston/7b53d74149dbb47f47fd to your computer and use it in GitHub Desktop.
yahoo oauth1 get_request_token example
https://api.login.yahoo.com/oauth/v2/get_request_token?oauth_callback=http%3A%2F%2Flocalhost&oauth_consumer_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx--&oauth_nonce=9D342B75-2A27-4A88-93E5-53DD4AE292F8&oauth_signature=sC0HZuTJySrxLCASwkvzbOwl1J4%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1425086133&oauth_version=1.0
signature is generated from putting these parameters into the base string, in correct sorted order:
oauth_callback=http%3A%2F%2Flocalhost&
oauth_consumer_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx--&
oauth_nonce=53DBBE7A-9A1F-4113-BFD3-26B31547CEA7&
oauth_signature_method=HMAC-SHA1&
oauth_timestamp=1425324801&
oauth_version=1.0
which is extra-encoded to get my exact signature base string:
GET&https%3A%2F%2Fapi.login.yahoo.com%2Foauth%2Fv2%2Fget_request_token&oauth_callback%3Dhttp%253A%252F%252Flocalhost%26oauth_consumer_key%3Dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx--%26oauth_nonce%3D53DBBE7A-9A1F-4113-BFD3-26B31547CEA7%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1425324801%26oauth_version%3D1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment