Setting up an Oauth Profile for a REST Message With Grant Type refresh_token

William Folck
Tera Contributor

Hello,

 

I'm trying to build a REST Message that connects to a 3rd party API using OAuth, but I'm unable to setup the OAuth profile correctly.  I was given the client ID, client secret, and refresh token, and the only way I was able to get a response from the token server is to use a script with sn_auth.GlideOAuthClient() using grant type refresh_token.  However, I don't see any way to save the access token anywhere.  The application registration doesn't have Refresh Token as a default grant type option, so I can't just go to the REST Message and click "Get OAuth Token".  I know there's an OAuth Credentials table, but if I try to manually add anything there, it won't save a name, so I don't know how I'd link it to the correct profile.  I can't even use a script to manually set the REST Message, since the setAuthenticationProfile requires you to link to the authentication profile, and won't let you manually put in any tokens.

0 REPLIES 0