Peter M 1 Posted September 1 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
Dave Nottage 629 Posted September 1 (edited) 14 hours ago, Peter M said: Where can i get the settings below Go to the cloud console. Select your project (if it does not do that automatically) - the Project ID value should be just under where is says welcome Click on APIs & Services Click on Credentials 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 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 September 1 by Dave Nottage Share this post Link to post
Peter M 1 Posted September 2 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. Share this post Link to post
Peter M 1 Posted September 2 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. 1 Share this post Link to post