npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

Iโ€™ve always been into building performant and accessible sites, but lately Iโ€™ve been taking it extremely seriously. So much so that Iโ€™ve been building a tool to help me optimize and monitor the sites that I build to make sure that Iโ€™m making an attempt to offer the best experience to those who visit them. If youโ€™re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, ๐Ÿ‘‹, Iโ€™m Ryan Hefnerย  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If youโ€™re interested in other things Iโ€™m working on, follow me on Twitter or check out the open source projects Iโ€™ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soonโ€“ish.

Open Software & Tools

This site wouldnโ€™t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you ๐Ÿ™

ยฉ 2025 โ€“ย Pkg Stats / Ryan Hefner

react-native-tiktok

v2.1.16

Published

Get authorized using ๐—ง๐—ถ๐—ธ๐—ง๐—ผ๐—ธ ๐Ÿ“ฑ

Readme

banner

Get authorized and fetch user profile

v2 uses modern Tiktok Open SDK and legacy API is dropped, if your RN version < 0.69 then please refer v1

Prerequisites

It's mandatory to provide iOS Universal Link and Android App Link to the Tiktok Developers Portal in order to Tiktok App to be able to call your App when the operation is completed.

Check this article how to setup Deep Links in React Native, only iOS Setup: (skip 3) and Android Setup:

Install

npm install react-native-tiktok

or

yarn add react-native-tiktok

cd ios && pod install

Getting started iOS

The following are the minimum system requirements:

  • iOS version 11.0 or later
  • XCode version 9.0 or later

Register your app with the TikTok for Developers website

  1. Sign up for a developer account on the TikTok for Developers website.
  2. Create a new app, add the required details, and submit it for review.

Configure your Xcode project

  1. Open your Info.plist file and add or update the following key-value pairs:
<key>LSApplicationQueriesSchemes</key>
<array>
   <string>tiktokopensdk</string>
   <string>tiktoksharesdk</string>
   <string>snssdk1180</string>
   <string>snssdk1233</string>
</array>
<key>TikTokClientKey</key>
<string>$TikTokClientKey</string>
<key>CFBundleURLTypes</key>
<array>
 <dict>
   <key>CFBundleURLSchemes</key>
   <array>
     <string>$TikTokClientKey</string>
   </array>
 </dict>
</array>

Note: Replace all $TikTokClientKey with your Client key retrieved from the developers portal

  1. Add the following code to your app's AppDelegate.swift file:
import TikTokOpenSDKCore

override func application(_ app: UIApplication,open url: URL, options:
    [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
      if (TikTokURLHandler.handleOpenURL(url)) {
          return true
      }
      return false
}

override func application(_ application: UIApplication, continue userActivity: NSUserActivity,
     restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
      if (TikTokURLHandler.handleOpenURL(userActivity.webpageURL)) {
          return true
      }
      return false
}

Getting Started Android

The minimum system requirement is an API level of 21: Android 5.0 (Lollipop) or later.

  1. Go to android/build.gradle file and add the maven repository
allprojects {
    repositories {
        maven { url "https://artifact.bytedance.com/repository/AwemeOpenSDK" }
    }
}
  1. Go to android/app/src/main/AndroidManifest.xml file after <application> tag before <activity add:

<meta-data android:name="TikTokClientKey" android:value="<TIKTOK_CLIENT_KEY>"/>

Expo Installation

This step is pretty straightforward and includes modification of only app.json file

"expo": {
  ...
  "plugins": [
    [
      "react-native-tiktok",
      {
        "tiktokClientKey": "<YOUR_TIKTOK_CLIENT_KEY>"
      }
    ]
  ]
}

Usage

import { authorize, Scopes } from 'react-native-tiktok';

authorize({
  redirectURI: '<YOUR_REDIRECT_URL>', // your universal link
  scopes: [Scopes.user.info.basic, Scopes.video.list, ...], // optional: "user.info.basic" will be included by default
  callback: (authCode, codeVerifier) => {
  // codeVerifier is returned only on Android
    console.log(authCode, codeVerifier);
  },
});

Use authCode to manage User Access Token