Jump to content
Peter M

RAD Server settings for push service

Recommended Posts

Hi Team,

 

Where can i get the settings below. Some I have worked out, others i am unable to deduce or generate.

 

Background

I am trying to configure my RAD Server to connect to FCM

In the OLD Documentation it states it requires just and API Key set in the EMSServer.ini

The New version (I'm not sure when possibly from Delphi 12.X) requires more settings

This is what the section looks like now

EMSServer.ini

[Server.Push.GCM]
;# This section is for FireBase Cloud Messaging (FCM) settings.
;# These settings are needed to send push notifications to an Android device
ClientID=
;# Set your OAuth2 client ID. Note, this must be a Desktop client.
ClientSecret=
;# Set your OAuth2 client secret
ProjectID=
;# Set your FCM project ID
RefreshToken=
;# Set your OAuth2 refresh token. You can get it using EMSDevServer, "Sign in FCM" button.
;# Note, this requires Microsoft Edge WebView2 runtime to be installed.

 

Share this post


Link to post
14 hours ago, Peter M said:

Where can i get the settings below

  1. Go to the cloud console.
  2. Select your project (if it does not do that automatically) - the Project ID value should be just under where is says welcome 
  3. Click on APIs & Services
  4. Click on Credentials
  5. If it already lists a Desktop OAuth credential in the OAuth 2.0 Client IDs list, click on the download action at the very far right - that will display the Client ID and Client Secret
  6. If there is no existing Desktop OAuth credential, click Create Credentials (at the top), select OAuth Client ID, then Desktop app, etc
     

See the comment in the INI file as to how to get the RefreshToken value. I expect that RADServer will populate this value once it has obtained it.

 

Edited by Dave Nottage

Share this post


Link to post

There is progress.
Adding a Client to OAuth with Type Desktop has made is past the process, slightly.

Now its asking for an authorised account, which I added,

Then i tried again, and now its asking to Deny or Allow access. But both buttons are disabled. 

I am unable to Allow the Account or figure out how to enable the buttons.

GoogleAllowDeny.png

Share this post


Link to post

I have found an answer

 

Next, before launching the DevServer, Go to Tools | Getit Package Manager and install the EdgeView2 SDK. Then copy in the WebView2Loader.DLL into the same directory from the redist directory. The Devserver needs to be in a writeable directory because the WebView2Loader DLL needs to create a subdirectory. I actually created a separate RADServerFCM directory with EMSDevServer and its dependent packages just to create the RefreshToken entry. If you are on a Windows 11 machine this should then work. If it is on Windows 10, you will also need to install the WebView2 SDK. The WebView2 will allow Google's login screen to display.

 

To send messages, please ensure that you are using the binaries from Delphi 12.3. There was a bug in 12.2 that required the use of libcurl.dll and even then only the 32 bit version of RAD Server could be used. The version should come back as 4.9.

  • Thanks 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×