NodeJS client to access the Tinder API
npm install tinder-client!Tinder Client


- Tinder Client
- Introduction
- Dependencies
- API
- Creating a client
- createClientFromFacebookAccessToken
- createClientFromFacebookLogin
- getProfile
- updateProfile
- getRecommendations
- getUser
- getMetadata
- changeLocation
- like
- pass
- superLike
- getUpdates
- messageMatch
- getMatch
- getMessage
- getCommonConnections
- resetTemporaryLocation
- temporarilyChangeLocation
- Local Development
- Git Hooks
- Commit Linting
- Retrieving Facebook User ID and Facebook Access Token
Tinder has an unofficial API that has been documented by this gist and fbessez/Tinder.
There is also an existing Node Client, tinderjs. This is a Promise-based equivalent.
tinder-client has two dependencies:
- axios (^0.18.0)
- tinder-access-token-generator (^2.0.0) - this is used to generate Tinder API access tokens
There are two ways to create a client
- If you have access to a user's Facebook access token, then you can use the createClientFromFacebookAccessToken factory function
- If you have access to a user's Facebook email & password, then you can use the createClientFromFacebookLogin factory function
The returned client object will have a variety of methods that will provide access to the Tinder API.
#### createClientFromFacebookAccessToken
``javascript
import { createClientFromFacebookAccessToken } from 'tinder-client';
const client = await createClientFromFacebookLogin('some facebook access token');
`
#### createClientFromFacebookLogin
`javascript
import { createClientFromFacebookLogin } from 'tinder-client';
const client = await createClientFromFacebookLogin({
emailAddress: 'your facebook email address',
password: 'your facebook password',
});
`
`javascript`
const profile = await client.getProfile();
`javascript
import { GENDERS, GENDER_SEARCH_OPTIONS } from 'tinder-client';
const userGender = GENDERS.female;
const searchPreferences = {
maximumAge: 100,
minimumAge: 99,
genderPreference: GENDER_SEARCH_OPTIONS.both,
maximumRangeInKilometers: 100,
};
const profile = await client.updateProfile({ userGender, searchPreferences })
`
`javascript`
const recommendations = await client.getRecommendations();
`javascript`
const user = await client.getUser('someUserId');
Get metadata for authenticated user
`javascript`
const myMetadata = await client.getMetadata();
`javascript`
await client.changeLocation({ latitude: 'someLatitude', longitude: 'someLongitude' });
`javascript`
await client.like('someUserId');
`javascript`
await client.pass('someUserId');
`javascript`
await client.superLike('someUserId');
`javascript`
await client.getUpdates();
await client.getUpdates('2019-02-05T00:00:00.004Z');
`javascript`
await client.messageMatch({ matchId: 'someMatch', message: 'someMessage' });
`javascript`
await client.getMatch('someMatchId');
`javascript`
await client.getMessage('someMessageId');
`javascript`
await client.getCommonConnections('someTinderUserId');
`javascript`
await client.resetTemporaryLocation();
`javascript`
await client.temporarilyChangeLocation({ latitude: 'someLatitude', longitude: 'someLongitude' });
After cloning the repository, use nvm / npm to install dependencies.
To run both all tests, execute npm run test.
To only run unit tests, execute npm run unit-test.
To only run integration tests, execute npm run integration-test.
In order to execute local integration tests successfully, you'll need to specify the following environment variables in the .env file
- FACEBOOK_EMAIL_ADDRESSFACEBOOK_PASSWORD
- TINDER_USER_ID
- (Your Tinder user id)
To build the production bundle, execute npm run build.
This project uses husky to maintain git hooks.
- pre-commit - run eslintcommit-msg
- - run commit message lintingpre-push
- - run unit tests
This project uses semantic-release and commitlint (specifically the Angular commit convention) to automatically enforce semantic versioning.
For local development, you might want to test the client out at on an ad-hoc basis or maybe even for integration testing.
In order to do so, you'll need to get your Facebook Access Token.
To retrieve a Facebook Access Token, you'll need to
- Go to this URL
- Open the Network tab/confirm
- Look for a request to
- Look at the response, specifically the for.jsmods.require[3][0] value, and search the text for access_token`