I have been trying for some time now to use UiPath to generate a Google API Bearer token. This is done automatically by the smart coding done on the Gsuite activity and I have seen a previous post where another user wanted to receive the output token from the Application Scope authentication so that it can be passed on but due to security concerns, the answer was no.
I find myself in a similar scenario where I would like to use BigQuery to send data to. I have managed to build an automation that can convert a data table into the JSON body needed to insert the data into BigQuery. I have also been able to test this using the Google OAuth2 Playground to generate a Bearer Token and provide this in the header of the API call. However, these are throw away tokens and I need to use a service account instead.
Where I am stuck, and with no programming experience, is constructing the JWT for the service account I want to use, more specifically the Signing of the encoded header and claims set using the p12 key and SHA256withRSA. If I could crack this part (using UiPath or InvokeCode within UiPath) then I would not need you to output the token.
This is what I have been working with: https://developers.google.com/identity/protocols/oauth2/service-account#httprest_1
Any help or a point in the right direction would be greatly appreciated