cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Body Content in Post Snap

jsmith141
New Contributor III

Hi,

This is a very novice question, but I am having trouble with a post request snap. This is just to authenticate with the RingCentral platform to receive a token for API consumption. I am able to successfully retrieve an access token when calling the oauth/token endpoint in Postman. The issue arises when I try to move this post call into SnapLogic. The call requires certain parameters to be passed through the body and I am not sure how to duplicate this in SnapLogic post snap. Please see the screenshot of the Postman call Body tab below.

image

I have created a basic account in SnapLogic to store the username and password and my post snap references that account. I am also aware that the credentials of a basic account can be accessed using the “Account.Username” and Account.Password" of the respective referenced account within the snap.

I am just not sure how to build out the body section in the “x-www-form-urlencoded” format as shown in the screenshot? The error I get back when validating this post snap is just a 400: Bad Request.

Any insight/help that anyone could provide would be greatly appreciated. Please let me know if additional information is needed to provide assistance.

Thanks,
James

48 REPLIES 48

Okay that is one difference (the fact that you use the token endpoint for both OAuth2 Endpoint and token fields) that I see you did that I had not done when I was trying to get the password grant type to work.

I have everything switched back over on the RIngCentral side. Do I still need to have the Auto-refresh token enabled on either side? Also do I need to click the authorize button when I edit the account and change back to password grant type (it doesn’t seem like I would need to click that button)?

Okay I get the same permissions error when switching back to a password grant type.

I have to stress that this does not happen when I follow the process in Postman, which leads me to believe that it is on the snapLogic side, or something between the data exchange specifically with the snapLogic post snap and RingCentral.

I also have to point out that this permission is not even an option in RingCentral. Finally the idea of just giving full permissions to the app in Ring Central is problematic, because in order to promote your app from the Sandbox to Production you have to test all permission scopes explicitly on top of meeting additional criteria before your app is eligible for promotion to production. So we really dont have the option of of giving a broad scope of permissions. Even if it did work, it leads to potential problems down the road.

Do we need to start looking at converting this thread into a ticket and escalating it?

Are you setting the scope within postman? if so, you can add it as an auth endpoint config with scope as the key and the items you have in scope as the value. For authorization_code, I believe you’ll need it in both the token and auth endpoint configuration, it’s worth having it in both for password authentication just in case, but again their documentation doesn’t specify the scope anywhere from what I had seen.

If this doesn’t work, or you’re not specifying the scope, I think escalating to a ticket might be beneficial.

No the permission scope is set in the application that you create on the RingCentral side and then you are provided with a client ID and secret for the application. Is there a way to convert this post to a ticket? There is a lot of relevant information here.

I think you could just link this thread in your ticket.