Advertisement
Jexal

Obtain a Pocket Request Token

Jan 18th, 2025
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. import requests
  2.  
  3. consumer_key = 'your_consumer_key'
  4. redirect_uri = 'your_redirect_uri'
  5.  
  6. response = requests.post('https://getpocket.com/v3/oauth/request',
  7.                          headers={'Content-Type': 'application/x-www-form-urlencoded'},
  8.                          data={'consumer_key': consumer_key, 'redirect_uri': redirect_uri})
  9.  
  10. request_token = response.json()['code']
  11. print(f'Request Token: {request_token}')
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement