fbessez / Tinder

Official November 2019 Documentation for Tinder's API (wrapper included)
MIT License
841 stars 198 forks source link

get_auth_token throwing exception #113

Closed louisdelaune closed 4 years ago

louisdelaune commented 4 years ago

Whenever I try and call get_auth_token with my Facebook token and id it throws an exception

Expecting value: line 1 column 1 (char 0)

def get_auth_token(fb_auth_token, fb_user_id, proxy): if "error" in fb_auth_token: return {"error": "could not retrieve fb_auth_token"} if "error" in fb_user_id: return {"error": "could not retrieve fb_user_id"} url = "https://api.gotinder.com" + '/auth' req = requests.post(url, headers=headers, proxies={"http": proxy}, data=json.dumps( {'facebook_token': fb_auth_token, 'facebook_id': fb_user_id}) ) try: tinder_auth_token = req.json()["token"] headers.update({"X-Auth-Token": tinder_auth_token}) print("You have been successfully authorized!") return tinder_auth_token except Exception as e: print(e) return {"error": "Something went wrong. Sorry, but we could not authorize you."}

tried with and without proxy and still no luck.

louisdelaune commented 4 years ago

nvm my fault