Home General

Web GMail error in RB 21

After finding where the OAuth2 properties are now located in RB21, and checking the new "Help", it seems like I followed all the steps, but sending an email report brought up the sign in page for my google account with error message "Auth error: Error 400: invalid_request. Missing required parameter: client_id"

I enter the client ID, client secret, and Redirect URI under Connection Settings- WebMail- GMailSettings-OAuth2. The error message is apparently due to these failing to be saved, because after saving and building the Delphi project, if I exit Delphi and re-start it, the OAuth2 settings are blanked.

As in RB 20, I register TppRestMailGMail on startup. I have tried the old redirect URI referencing IE in RB 20, as well as the 2 new options suggested in the new help for RB21. There is some setting or file to include I must be missing. It is peculiar the the Connection Settings property "WebMail" is greyed out. It allows me to expand "WebMail" to enter the OAuth2 settings, but they don't persist. I am not sure if there is port setting or what I need to get the OAuth2 for GMail settings to persist??

Scott S.

Comments

  • Once again, a partial answer to my own question. I still can can't get the OAuth2 properties to persist in the Delphi Object inspector, which would be preferable. But assigning those properties in the "Before EMail event works fine, like:
    ConnectionSettings.WebMail.GmailSettings.OAuth2.ClientID:=
    '295660625281-944oh5d8f7gl7hsqill5gn9s6phlrb52.apps.googleusercontent.com';
    ConnectionSettings.WebMail.GmailSettings.OAuth2.ClientSecret:=
    'my own "secret" put in here!';
    ConnectionSettings.WebMail.GmailSettings.OAuth2.RedirectURI:=
    'http://localhost';
  • Hi Scott,

    We are researching this. It appears that the object inspector properties are incorrectly being cleared when the report definition update process from RB 20 to 21 is occurring. I'll post here once a solution is found.

    For now, you can set the properties in code to continue testing the new authorization system.


    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
Sign In or Register to comment.