Skip to content

Server Setup

HB-Hridoy edited this page May 21, 2026 · 4 revisions

Follow this steps carefully to setup sender server

Create new Apps Script project

1
2
  • Rename Project
  • Go to Project Settings

3
  • Enable Show "appsscript.json" manifest file in editor

4
  • Go to appsscript.json
  • Add this field "oauthScopes": [ "https://www.googleapis.com/auth/script.external_request" ]
  • Save file

Setup script credentials

4_1
  • Paste server script template to your .gs file
  • Set your SECRET_KEY

5
6
  • Copy Project ID and paste it into your Script

7
  • Go to Service Accounts tab

8
  • Generate new private key
  • Download private key json

9
  • Paste your full private key json into SERVICE_ACCOUNT variable

10
  • After setting all 3 variables Save file
  • Select testSetup() method
  • Run script

Test your script

11
  • On first test run you have to authorize permission
  • Click on Review Permission

12
  • Click Advance

13
  • Click Go to FCM Sender Server (unsafe)

14
  • Click Continue to approve permissions

Test Result

15

If test result shows FCM response: 400 • Auth OK that means your script is ready to deploy

Project Deployment

16
  • Click Deploy
  • Click on New Deployment

17
  • Click on Gear icon
  • Select Web App

18
  • Add Description
  • Keep Execute as ME
  • Select Access to Anyone

19

Project deployed successfully. Copy Web Url and use it on Extension

Clone this wiki locally