Download the PHP package henshall/php-tinder-api without Composer

On this page you can find all versions of the php package henshall/php-tinder-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-tinder-api

PHP Tinder API

Version: 1.0.0

This is a PHP package for Tinders (Match Group, Inc.) API.

Tinders API is private - and there is not very much information on the internet about how to access or use it. I have used chromes networking tab to examine Tinder xhr requests to create this API - it contains some methods found no where else on the internet - including verion 3's sms authentication requests (new as of the last month of writing).

Additionally - you will find lots of examples as well as tips and trick, common mistakes while using, and more.

Classes in this Package:

Tinder API: The Tinder API returns the json decoded results directly from the Tinder API without any modifications. Some of the methods may need updating every once in a while, but I have found the have remained the same for the last few years.

Tinder Mock Api: You can use the 'Tinder Mock API' class for testing or developing since tinder has a strict limit on requests per hour. You don't want to be working with real data, so I have gone ahead and created this MockAPI with examples below on how to use it.

Tinder Interface: The interface ensures that we have the same methods in both classes, and you can inject this as a dependancy into your code to help decouple the API/MockAPI from your code. You can see some examples below.

Installation with Composer:

Pre-requisites

Usage:

Make sure to include the packages in your project:

Authentication Step 1 (Send an sms message to your phone for verification)

In this step, we will receive an sms message to our cell phone linked with our tinder account.

Authentication Step 2 (Return the code to Tinder and specify the phone number that received it)

After receiving the code, we send it back to tinder and receive a refresh token. We will use this to get our real token, which will expire after some time.

Authentication Step 3 (Request a Tinder Token)

Here we can request our tinder token which we will use for the remainder of the method. If the tinder token expires, you can simple generate a new one with the refresh token.

Get Profile

This gets the current users profile including bio, images, age, sex, and more.

Get MetaData

This gets the current users metadata which includes stuff like what a user will see in tinder banners, the users setttings, and more.

Get Recommendations

This gives you a list of other users you can swipe on - and that are recommended to you based on your profile settings. It returns 0-25 potential matches.

Like (Swipe Right)

This likes another user (aka swipes right on them). You can find the users id in the getRecommendations method above.

Pass (Swipe Left)

This passes another user (aka swipes right on them) and ignores them. You can find the users id in the getRecommendations method above.

Change Location

A user can change their location using this method. Here we try to update the users swipe location. If it fails, we will simply return false instead of throwing an error.

Using The Tinder Mock API:

The Tinder Mock API will return successful mock responses for all of the same methods in the TinderApi. For example, you can see the example using the TinderMockApi's getProfile, is the example same as the TinderApi's.

Using The TinderApiInterface

Both the TinderApi and the TinderMockApi implement the TinderApiInterface. This not only ensures they have the same methods, but also allows us to decouple our code for testing purposes. The following example is from a Laravel project where the interface is injected during construction. This is a "swiper" class which is responsible for using the Tinder API for swiping.

In production we can use the swipe class as follows:

While testing, we can use the class as follows:


All versions of php-tinder-api with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version >=6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package henshall/php-tinder-api contains the following files

Loading the files please wait ....