Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.43 KB

File metadata and controls

59 lines (40 loc) · 1.43 KB

Firebase-GetStreamIO-Migration-REST

Syncs Firebase Authentication with GetStreamIO Chat Messaging.


Documentation

Overview

This server application is built using Express.js and is designed to integrate Firebase users with the GetStream chat service. The application receives requests, processes the data, and responds accordingly. This document provides a guide for using the application, specifically focusing on the /chat/addAllFirebaseUsersToStream endpoint.

API Endpoints

GET https://firebase-getstreamio.apps.johnseong.com/

Returns a simple text response indicating that the server is running.

POST https://firebase-getstreamio.apps.johnseong.com/chat/addAllFirebaseUsersToStream

Adds all Firebase users to the GetStream chat service. It filters out the users that already exist in Stream and only adds the new users.


Example

Sample Request

POST https://firebase-getstreamio.apps.johnseong.com/chat/addAllFirebaseUsersToStream
Content-Type: application/json

{
  "serviceAccount": <your_firebase_service_account_json_object>,
  "streamApiKey": "<your_getstream_api_key>",
  "streamApiSecret": "<your_getstream_api_secret>"
}

Sample Response

200 OK
Content-Type: application/json

{
  "message": "Users added successfully"
}

Or, in case of an error:

500 Internal Server Error
Content-Type: application/json

{
  "message": "Internal Server Error",
  "error": "<error_message>"
}