Twitter Sign Up/Log In

Users can log in/register the system through their Twitter account

API Usage Instructions

Before calling the API, please ensure you have thoroughly read the relevant API documentation. Below are specific instructions for different login methods:

一、 Setting Up Twitter Login Configuration

For more detailed steps, please refer to the Twitter developer documentation: Twitter Developer Documentation

Before using the third-party login service, you need to register as a developer on the respective platform and create an application. The registration steps for Twitter are as follows:

  1. Visit Twitter Developer: Log in to the Twitter Developer platform using your Twitter account.

  2. Create a New Application: Create a new application and obtain your API key and API secret key.

  3. Obtain App ID and App Secret: After successful creation, obtain the Client ID (Client ID) and Client Secret (Client Secret).

  4. Configure the Client ID and Client Secret in the White Label Management Backend.

二、Retrieve Third-Party Login Configuration Information

Call the third-party configuration API to obtain the ClientId registered in the first step.

Request Parameters:

{
    // Third-party source: Supported third-party login sources
    // Optional values include: google, facebook, twitter, telegram, apple, metamask, separated by commas
    "thirdSource": "google,twitter"  // Example: using Google and Twitter login
}

Response Structure:

三、Login Code Implementation

Refer to the documentation: Hello.js Documentation

1. Install Hello.js via NPM:

2. Initialize Hello.js:

3. Initiate Login Authorization Request:

4. Twitter Access Token Verification

Call the Twitter third-party login verification API.

Request Parameters:

Response Structure:

5. Complete Login/Register: Based on the information returned in the previous step, call the third-party login or registration API.

Through the above steps, you can successfully integrate Twitter login functionality and obtain the user's authorized Access Token. If you encounter issues during integration, please check the network connection or the configuration of your Twitter application to ensure all steps are correctly followed. For more information, please refer to the Twitter developer documentation.

Last updated