cancel
Showing results for 
Search instead for 
Did you mean: 

Gmail API Web API Services Dynamic Subject Bug

ManishKathuria1
Level 2
Hi,
I am Using Gmail API with Blueprism Web API Services and it's working fine. 
I have a requirement Where I need to use same API services for multiple user hence need to pass Subject as an input parameters which is also possible here However, When I use this service once using one user id I can't use the same service (object) again for the different user ID unless I close and open Blueprism again. I have tried resetting JWT Expiry to 5 sec also but it did not work as well. 

36572.png


36573.png


Any one there have faced this issue or know the solution how to reset JWT token or Subject.
1 BEST ANSWER

Helpful Answers

ewilson
Staff
Staff
Hi @ManishKathuria1,

When you say changing the JWT expiry "did not work as well" do you mean it didn't work at all, or it worked sometimes - not all the time? Unfortunately, the GMail REST API doesn't support the use of service accounts which is really what you need here for working across multiple user instances. Due to how .NET garbage collection works and the fact that BP doesn't cleanup objects until the process terminates I don't think there's much that can be done with the Web API feature.

There may be some other options. One option would be to build an integration using the GMail .NET package (available via Nuget). That should give you greater control over what's being done with the authentication. You can read ore about this here: https://developers.google.com/gmail/api/quickstart/dotnet

The other option would be to try connecting to GMail using IMAP/SMTP. There's a free IMAP VBO on the DX from Auro. It only has one review, and it's not great, but it might put you on the path to success. You can find it here: https://digitalexchange.blueprism.com/dx/entry/3338/solution/auro-imap-vbo

Cheers,

View answer in original post

1 REPLY 1

ewilson
Staff
Staff
Hi @ManishKathuria1,

When you say changing the JWT expiry "did not work as well" do you mean it didn't work at all, or it worked sometimes - not all the time? Unfortunately, the GMail REST API doesn't support the use of service accounts which is really what you need here for working across multiple user instances. Due to how .NET garbage collection works and the fact that BP doesn't cleanup objects until the process terminates I don't think there's much that can be done with the Web API feature.

There may be some other options. One option would be to build an integration using the GMail .NET package (available via Nuget). That should give you greater control over what's being done with the authentication. You can read ore about this here: https://developers.google.com/gmail/api/quickstart/dotnet

The other option would be to try connecting to GMail using IMAP/SMTP. There's a free IMAP VBO on the DX from Auro. It only has one review, and it's not great, but it might put you on the path to success. You can find it here: https://digitalexchange.blueprism.com/dx/entry/3338/solution/auro-imap-vbo

Cheers,