Giter Club home page Giter Club logo

tinder-token's Introduction

tinder-token

Python library for generating access tokens for using Tinder API, using Facebook or Phone authentication.

Quick Start

Install the package:

pip install -U tinder-token

If you want to use Facebook authentication, install with the following:

pip install -U tinder-token[facebook]

CLI Script

A sample script is installed with the package. Follow the prompts in order to retrieve your access token.

./tinder-token

API - Facebook

The facebook.get_tinder_token function will return a tuple, which contains the tinder token and refresh token.

from tinder_token.facebook import TinderTokenFacebookV2

facebook = TinderTokenFacebookV2()

def sample_email_password(email: str, password: str) -> (str, str):
    return facebook.get_tinder_token(fb_email=email, fb_password=password)

def sample_facebook_token(fb_token: str) -> (str, str):
    return facebook.get_tinder_token(fb_token=fb_token)

API - Phone

from tinder_token.phone import TinderTokenPhoneV2

phone = TinderTokenPhoneV2()

def sample_phone(phone_number: str) -> str:
    phone.send_otp_code(phone_number)
    otp_code = input('code: ')

    refresh_token = phone.get_refresh_token(otp_code, phone_number)
    return phone.get_tinder_token(refresh_token)

tinder-token's People

Contributors

meister245 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

agilyol celtiberi

tinder-token's Issues

Facebook login no longer works

Facebook changed something on their end within the past month that breaks the authentication of your module. I am not well-versed enough in Facebook logins to help much.

cannot retrieve facebook access token anymore

Hello all,

I think the code is not working anymore, probably a change in the last few months on fb side....

I believe the URL should work, maybe the issue is on the MOBILE_USER_AGENT ?

The error message isn't helpful : FB_AUTH_TOKEN = {'error': 'access token could not be retrieved. Check your username and password.'} I did check that both the username and password are fine of course !

Is it working still for everyone else ?

I am using the following code :

import re
import robobrowser
import requests
MOBILE_USER_AGENT = "Tinder/7.5.3 (iPhone; iOS 10.3.2; Scale/2.00)"

def get_access_token(email, password):
s = robobrowser.RoboBrowser(user_agent=MOBILE_USER_AGENT, parser="lxml")
s.open(FB_AUTH)
f = s.get_form()
s.submit_form(f)
f = s.get_form()
f["pass"] = password
f["email"] = email
s.submit_form(f)
f = s.get_form()
try:
s.submit_form(f, submit=f.submit_fields['CONFIRM'])
access_token = re.search(
r"access_token=([\w\d]+)", s.response.content.decode()).groups()[0]
return access_token
except requests.exceptions.InvalidSchema as browserAddress:
access_token = re.search(
r"access_token=([\w\d]+)",str(browserAddress)).groups()[0]
return access_token
except Exception as ex:
print("access token could not be retrieved. Check your username and password.")
print("Official error: %s" % ex)
return {"error": "access token could not be retrieved. Check your username and password."}

Updating age filter, with https://api.gotinder.com/v2/profile or https://api.gotinder.com/profile?

I try to update the age filter, and it works only with first version of Tinder API, this link, https://api.gotinder.com/profile, if i use version2, (https://api.gotinder.com/v2/profile), i get 200 status response, but the filter it's not change in the profile, so i'm wondering if using the first version of API is somehow prejudicial on the tinder profile used or not,

and if there is a way to make it works on V2.

thanks

This is the code i send
{
"age_filter_min": 23,
"age_filter_max": 23
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.