Page 1 of 1

Invoke google api using JWT oauth2 with RSASHA256 encryption

Posted: Thu Jun 26, 2025 1:21 am
by robinvj
I have a requirement to invoke a Google API using OAuth2 authentication with RSASHA256 encryption.

Is this possible using RPG on IBM i?

Any help appreciated. Thanks

BTW, Today we use YAJL for building JSON & HTTPAPI to transport payload.

Re: Invoke google api using JWT oauth2 with RSASHA256 encryption

Posted: Fri Jun 27, 2025 11:07 pm
by Scott Klement
Hello,

Yes, its possible.

Midrange Dynamics has a product called MDRest4i that has routines to generate JWT tokens using RSASHA-256 that are written in RPG and are aimed at RPG programmers. So that might work, assuming your OAuth2 is using JWT tokens (This is commonplace.)

You could also write it yourself using the system APIs. This is a significant amount of work, though, you'll have to research how the tokens work, how the OAUTH2 architecture works, and write it all.