Set Request body of an Oaut token request in JSON

AdriaM
Mega Sage

Hi all,

I'm trying to configure a Request Message with Oauth 2 autenthication via Application Registry.

Third party requeriment is that request Body of the Token Request Call should be a JSON with a specific format.

Everything I've tried generates the body like URL parametres, & separated. The only way that I've found is generate de RestMessageV2 or use GlideOAuthClient.

I've also developed an Oauth Api Script but I'm not able to find documentation about oauthContext. oauthContext lets me change headers but I'm not able to change the body

Is there any way to update body request to set it as a json? 

Thank you, in advance.

 

 

6 REPLIES 6

Omar Martinez1
Tera Contributor

Hi @AdriaM We having the same problem to connect to API Gee from Third party. Could you help me with steps to create this new Oauth Message in 2 calls? Thanks in advance.

In our case, we finally treated our request as a non standard oauth2 call.

We developed two REST calls. First one to take the token, and another one to make the call we the token received.

As two separate calls we could manage the message as we need.