Forum Discussion
Thanks for your response. That entry is actually not selected. The extension can be concatenated to the username( a phone number in this case) and passed with the username at that point. That is what I am currently doing in that snapshot you see above.
I am trying to get an OAuth2 account working in this case. The app in Ring Central does not provide a redirect URL, which if I understand correctly, rules out the option of authorization_code flow. I am trying to get it to authorize using the password flow but I get an error string in a new tab. See below.
{“response_map”: {“error_list”: [{“message”: “Request from platform.devtest.ringcentral.com returned an error (response code: 400, response: {\n "error" : "invalid_client",\n "errors" : [ {\n "errorCode" : "OAU-123",\n "message" : "Client authentication is required"\n } ],\n "error_description" : "Client authentication is required"\n})”}]}, “http_status_code”: 500}
Do you know what I might be missing? Again please forgive my lack of knowledge in this area.
redirect_uri is what is provided for SnapLogic to respond, in this case, it would likely be (in the rest account) https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/rest which redirects back to the base url for snaplogic to complete the next step of the auth. If you move to openAPI, you’ll replace rest
with openapi
. The REST OAuth2 Account documentation has it right at the top under Account Settings, it’s quite a bit confusing here because in this case you may not know what a POD is.
- jsmith1414 years agoNew Contributor III
So if I understand you correctly, it sounds like there really should have been a place on the RingCentral side to add a redirect url? I did check several times because I expected there to be one as well, but never saw an option to enter a redirect url.
- jsmith1414 years agoNew Contributor III
I added the redirect_uri argument to both the token and auth endpoint config sections using the uri you provided above.
When I click on the authorize button it looks like it is successful. A tab is temporarily opened and closed(it appears blank for its entire short duration on screen) and then the access token, refresh token, and Access token expiration are all populated. The first two are indicated to be encrypted and the expiration is a long numeric string.
However, when I go to validate the pipeline I get a long wait and then an error on the rest get snap which reads…
Failure: Error reading account, Reason: Snapi request failed: {“response_map”: {“error_list”: [{“message”: “Request from platform.devtest.ringcentral.com returned an error (response code: 400, response: {\n "error" : "unauthorized_client",\n "errors" : [ {\n "errorCode" : "OAU-251",\n "message" : "Unauthorized for this grant type"\n } ],\n "error_description" : "Unauthorized for this grant type"\n})”}]}, “http_status_code”: 500}
The only thing I can see is that it is possible that the client id and client secret are not being passed as expected by RingCentral (i.e. concatenated together as client_id+‘*’+client_secret and then the whole thing is base64 encoded). Does this account type take care of that in the background, or is the issue something else entirely? I do see in the error that there is an “Unauthorized for this grant type”, but I am successfully using that grant type in Postman.
Thanks,
James- ddellsperger4 years agoAdmin
I created a RingCentral account yesterday, but haven’t been able to get a Sandbox account up and running. I did get to the point in the provision where login takes place and I can share some screenshots there, but here’s the screenshot of my account on the SnapLogic side (it’s a REST OAuth 2 Account)
On the RingCentral side, you’ll want to set your application to be a 3-legged application with redirect_uri being the previously mentioned uri (https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/rest
).
This will bring up a RingCentral login prompt for you to fill out with your (I believe) sandbox account, and then it should be able to get a token back from the token endpoint. Again, I haven’t been able to get a Sandbox account created through RingCentral, so I can’t validate this on my side.Our OAuth2 Account will follow the Auth code flow semantics directly that they specify here. You’ll need to check the box at the bottom of the account that specifies Sending Client Data as Basic Auth header, that’s talked about in the “Step 3. Exchange auth code for access token” section. Once it authorizes properly, you’ll want to then check the box that says “Auto-refresh token” in our snap account configuration, as that will continually refresh the token behind the scenes so that you don’t have to perform the login screen piece any more.
- jsmith1414 years agoNew Contributor III
I think I see what I need to do differently. On the RingCentral side, I don’t think I chose the 3-legged OAuth flow authorization code. So let me try to setup the way you have pointed out here. I am betting I will have to create a new app on the RingCentral side. I will get back with you on this post once I have done that.
Thanks,
James