Generate an Airtable OAuth token using Python

Using a Python OAuth library, I try to build an Airtable token like the Google method. I get errors with redirect URIs and API version. Example code:

import custom_oauth

def acquire_token():
    oauth_session = custom_oauth.Session(client_id='ABC123', redirect_url='http://127.0.0.1')
    token = oauth_session.obtain_token(auth_endpoint='https://airtable.com/auth', scopes=['read'])
    return token

print(acquire_token())

hey, check ur redirect uri matches exactly what airtable reg expects! maybe try using https or a valid port for local testing. also, ensure your api ver is correctly configured in your lib settings.