Code Monkey home page Code Monkey logo

tinder's Introduction

Tinder API Documentation -- 2017

First off, I want to give a shoutout to @rtt who initially posted the Tinder API Documentation that I found most of these endpoints on. I am writing this to provide a more up-to-date resource for working with the Tinder API.

Note: This was updated in September 2017. API might be outdated.

API Details

Host api.gotinder.com
Protocol SSL

Required Headers

Header Example
X-Auth-Token See "How to get facebook_token" below
Content-type application/json
User-agent Tinder/7.5.3 (iPhone; iOS 10.3.2; Scale/2.00)

Known Endpoints

Note: All endpoints are concatenated to the host url

Note: All curls must be sent with the headers as well (the only exception is that the /auth call must not have the X-Auth-Token header)

Endpoint Purpose Data? Method
/auth For authenticating {'facebook_token': INSERT_HERE, 'facebook_id': INSERT_HERE} POST
/user/recs Get match recommendations {} GET
/user/matches/_id Send Message to that id {"message": TEXT GOES HERE} POST
/user/_id Get a user's profile data {} GET
/user/ping Change your location {"lat": lat, "lon": lon} POST
/updates Get all updates since the given date -- inserting "" will give you all updates since creating a Tinder account (i.e. matches, messages sent, etc.) {"last_activity_date": ""} Input a timestamp: '2017-03-25T20:58:00.404Z' for updates since that time. POST
/profile Get your own profile data {} GET
/profile Change your search preferences {"age_filter_min": age_filter_min, "gender_filter": gender_filter, "gender": gender, "age_filter_max": age_filter_max, "distance_filter": distance_filter} POST
/meta Get your own meta data (swipes left, people seen, etc..) {} GET
/report/_id Report someone --> There are only a few accepted causes... (see tinder_api.py for options) {"cause": cause, "text": explanation} POST
/like/_id Like someone a.k.a swipe right {} GET
/pass/_id Pass on someone a.k.a swipe left {} GET
/like/_id/super ~Super Like~ someone a.k.a swipe up {} POST
/matches/{match id} Get a match from its id (thanks @jtabet ) {} GET
/message/{message id} Get a message from its id (thanks @jtabet ) {} GET
/passport/user/reset Reset your location to your real location {} POST
/passport/user/travel Change your swiping location {lat: latitutde, lon: longitude} POST

Status Codes

Status Code Explanation
200
400
501

Config File

facebook_access_token and fb_user_id

Simply input your facebook username/email and password in your config file. Then, the fb_auth_token.py module will programmatically retrieve your facebook_access_token and fb_user_id. These are then used to generate your tinder_auth_token in tinder_api.py which grants you access to your data! Happy Swiping!

Note: With the help of philliperemy , I have included a programatic way to acquire your facebook_token. Now, in your config.py just input your facebook username and password.

Key Features

Match_Info:

Creates a local dictionary containing the following keys on each of your matches

{
	  123456: {
	    'messages': [

	    ],
	    'age': 20,
	    'match_id': '123456789123456789',
	    'name': 'Joakim',
	    'photos': [
	      'http://images.gotinder.com/123456789123456789.jpg',
	      'http://images.gotinder.com/123456789123456789.jpg',
	      'http://images.gotinder.com/123456789123456789.jpg',
	      'http://images.gotinder.com/123456789123456789.jpg'
	    ],
	    'message_count': 0,
	    'last_activity_date': '15 days, 16 hrs 46 min 57 sec',
	    'ping_time': '2017-03-11T04:58:56.433Z',
	    'gender': 1,
	    'bio': 'New York Knicks Center',
	    'avg_successRate': 0
	  },
	  56789: {
	    ...
	  }
}

Sorting:

Sorting matches by "age", "message_count", and "gender"

[
	  ('123456789123456789',
	  {
	    'messages': [

	    ],
	    'age': 19,
	    'match_id': '123456789123456789abcdefghi',
	    'name': 'Carmelo',
	    'photos': [
	      'http://images.gotinder.com/123456789123456789.jpg',
	      'http://images.gotinder.com/123456789123456789.jpg',
	      'http://images.gotinder.com/123456789123456789.jpg',
	      'http://images.gotinder.com/123456789123456789.jpg'
	    ],
	    'message_count': 0,
	    'last_activity_date': '0 days, 22 hrs 23 min 45 sec',
	    'ping_time': '2017-03-25T23:22:08.954Z',
	    'gender': 1,
	    'bio': 'I do not like to win sometimes', 'avg_successRate': 0.7837966008217391
	    }
	    )
]

The following is no longer available due to Tinder setting their ping_time to a constant date in 2014 and/or the removal of Tinder Social.

```

Friends' Pingtimes:

friends_pingtimes() will return the following for each facebook friend of yours who has a Tinder friend_pingtime_by_name("Joakim Noah") will return the pingtime for only that particular friend. The following is a sample result for friends_pingtimes():

"Joakim Noah -----> 15 days, 16 hrs 46 min 57 sec" "Carmelo Anthony ------> 0 days, 22 hrs 23 min 45 sec" ...

Facebook Friends:

Given a name, it returns some profile information and their id. Once you have the ID, then you can call api.get_person(id) to get more in-depth information on your friends.

{
	  'Martin Shkreli': {
	    'photo': [
	      {
	        'processedFiles': [
	          {
	            'url': 'https://graph.facebook.com/123456789/picture?height=84&width=84',
	            'height': 84,
	            'width': 84
	          },
	          {
	            'url': 'https://graph.facebook.com/123456789/picture?height=172&width=172',
	            'height': 172,
	            'width': 172
	          },
	          {
	            'url': 'https://graph.facebook.com/123456789/picture?height=320&width=320',
	            'height': 320,
	            'width': 320
	          },
	          {
	            'url': 'https://graph.facebook.com/123456789/picture?height=640&width=640',
	            'height': 640,
	            'width': 640
	          }
	        ]
	      }
	    ],
	    'in_squad': True,
	    'name': 'Martin Shkreli',
	    'user_id': '582bf320452u3yy1217f8'
	  }
}

tinder's People

Contributors

alnk666 avatar fbessez avatar yaoxing1990 avatar

Watchers

 avatar  avatar

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.