

For example, the Activity Feed endpoint is /v4/checkin/recent so you can pull data from this endpoint like this: activity_feed = () This wrapper mirrors the API endpoint structure detailed in the documentation. Making requests to the Untappd API is simple. # Apply the returned access token to the client

In your webserver, parse out the code value, and use it to call _access_token() # Interrogate Untappd to get the user's access_tokenĪccess_token = _access_token('XX_CODE_RETURNED_IN_REDIRECT_XX') They will then be redirected to your redirect_url, with a query paramater of code=XX_CODE_RETURNED_IN_REDIRECT_XX.

Redirect your user to the address auth_url and let them authorize your app. Usage # Construct the client object (user_agent is optional, at least 'authorize' endpoint responds with 'HTTP 429 Too Many Requests' to default User-Agent header string like 'python-requests/2.24.0')Ĭlient = untappd.Untappd(client_id='YOUR_CLIENT_ID', client_secret='YOUR_CLIENT_SECRET', redirect_url='YOUR_REDIRECT_URL', user_agent='letmein')įor endpoints that access a user's data, you must obtain an access token before you can request data from the API: # Build the authorization url for your app Developed to power No Gluten Beer.īased almost entirely on the excellent foursquare.
