Total noob here.
Using python and I’m trying to just get a non 400 response code. Not using flask as what I’m making is entire local, its not for a website, I don’t want my clients to auth or anything, I just want information for myself so I can better organize it.
Currently fails to launch with KeyError
oauth_client = patreon.OAuth(client_id, client_secret)
tokens = oauth_client.get_tokens(requests.get(“https://www.patreon.com/api/oauth2/v2/identity?fields[user]=about,created,email,first_name,full_name,image_url,last_name,social_connections,thumb_url,url,vanity”), redirect_uri=‘https://www.remoteitsupportwa.pw’)
access_token = tokens[‘my access token here’]
api_client = patreon.API(access_token)
user_response = api_client.get_identity()
user = user_response.data()
memberships = user.relationship(‘memberships’)
membership = memberships if memberships and len(memberships) > 0 else None
The documentation is kinda confusing for just wanting to access information personally and not give out access to my patreons. Every other source of information on learning how to do this only gives examples using public APIs and is useless.