function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
koshkosh 

Named credentials Google API Auth

I'm working on connecting our salesforce app to talk to our google pubsub services. Now, I have the auth token part of it working, by presenting JWT as described here - https://developers.google.com/identity/protocols/OAuth2ServiceAccount . This gives us the auth token that I then present to my rest calls to publish messages.

Now, I'm starting to wonder if anyone has a better way of connecting to Google APIs. In an ideal world, I would attach a cert defined in named credential to all of my callouts to Google APIs, but I haven't found any examples for this and I'm having a hard time articulating why this doesn't work or isn't supported out of the box.

I'm an oauth noob here. Have self signed certs on rest requests been deemed inherently insecure? Is there a better/easier way to connect to google services?

FilikinFilikin
Hi Kosh, I know it is a while since you posted this, but did you get a solution?
I am trying to use Named Credentials to create users in a G-Suite domain and getting an error as soon as I add the directory services to the scope.