cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

OAuth2 issues authorizing to Box

jposey
New Contributor II

I am using REST snaps to connect to and perform functionality in Box that are not available via Box Snaps. I am having trouble establishing my OAuth2 account. I have my โ€˜applicationโ€™ setup in Box to connect to and have the client ID and secret all setup as well as the redirect URI to go to https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/rest.

When I try to authorize in the account creation in SnapLogic, I get prompted as expected by Box but am then redirected to a SnapLogic error after logging in. The error details state:

โ€œUnable to decrypt property โ€˜$.settings.client_idโ€™ with key: account-autogenโ€
โ€œ400 Bad Requestโ€

Any ideas?

15 REPLIES 15

aleung
Contributor III

Do you get this page? Did you checked โ€œHeader authenticatedโ€ checkbox?

15 AM

jposey
New Contributor II

When clicking โ€œAuthorizeโ€ when creating/editing the user in SnapLogic, I do see the page you included. When I click โ€œGrant access to Boxโ€ I am redirected to the URL, https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/rest which includes a โ€œstateโ€ parameter and a โ€œcodeโ€ parameter. However, the page displays this error below.

{โ€œquery_stringโ€: โ€œstate=hostname%3Dhttps%3A%2F%2Felastic.snaplogic.com%2Cinstance_id%#############################################&code=##################################โ€, โ€œpathโ€: โ€œ/api/1/rest/admin/oauth2callback/restโ€, โ€œresponse_mapโ€: {โ€œerror_listโ€: [{โ€œmessageโ€: โ€œUnable to decrypt property โ€˜$.settings.client_idโ€™ with key: account-autogenโ€}]}, โ€œhttp_statusโ€: โ€œ400 Bad Requestโ€, โ€œhttp_status_codeโ€: 400}

Thanks again for your time and insight!

andrew_holbrook
New Contributor III

@jposey, Iโ€™m curious, what use case are you trying to enable?

It is NOT fully tested nor feature complete, but Iโ€™ve been dabbling on a new Box snap pack to enable more of their API (with 136 snaps!!). I also implemented Boxโ€™s JWT account authentication, which allows you to authenticate as either a service account or as an โ€œApp Userโ€. If you want to experiment with this let me know (although FYI Iโ€™m extremely busy the next two weeks so you may have to prod me).

Iโ€™ll also be at Box Works in the late morning and afternoon tomorrow if youโ€™re attending that!

-Andrew

At a high-level, I am trying to upload documents to Box and populate a Box metadata template with values specific to the documents. Box Snaps allow me to upload the document and obtain the Box file ID, but I am having to leverage the Box APIs in order to do the metadata components.

Have you been able to successfully create an oAuth account do leverage within the REST snaps with Box? If so, Iโ€™d be interested in if youโ€™ve seen issues similar to what I have asking about in this thread.

Sorry, no I donโ€™t need to use the REST snaps with Box. ๐Ÿ˜‘