Ui Elements 'Content Open With' - How to get service account token so I can add integration app.
The guide shows the steps on how to add an integration app to an app user, but I something is not working quite right.
The guide: https://developer.box.com/guides/embed/ui-elements/open-with/
I suspect the service account access token is my issue, but not really sure. When I generate a service account token, i thought that is using the Id of the app user that was created in Box for the App created in dev console. I use that app user already to connect using Box CLI and some webhook integration with Salesforce. When I try to generate a token (box token:get) as this Id, or as an admin, I get the same error:
{"type":"error","status":404,"code":"not_found","help_url":"http://developers.box.com/docs/#errors","message" :"Authorization Failed","request_id":"..."}
As per the guide, it is likely something to do with the needing a service account token. Honestly I've read the guide over and over, and it's not really clear what it means or it's not working. All the permissions are checked in the dev console for the app.
Can you clarify which user I should be using to generate the token in CLI? The Admin/Co-Admin/App User for the created app? Or is there a special way to get the service account token generated?
-
-
Hi ,
Glad to see you're trying out the Open With element! Hmm, the issue you're seeing is interesting... let me see if I understand first.
Right now, it sounds like you haven't gotten to the step of doing anything with the Element, right? It sounds like you're stuck on the first step, at just generating a token for any user. If I'm misreading, let me know!
For the token issue, just to make sure, these are the three user types I'll refer to:
* The "admin" user - this is the user you log into Box.com with, and it's tied to a real email address. You use this to navigate around the Admin Console or Dev Console.
* The "service account" - this is the user that's created when you authorize the application in your admin console.
* "App User" - this is a user created using a token from the service account. Typically represents a single user.
To continue with the guide for the UI Element, you need a token for the Service Account. This is the token returned by default if you just run box tokens:get with no ID specified:
https://github.com/box/boxcli/blob/master/docs/tokens.md
It sounds like you've already been working with the Service Account through your work in SFDC, correct? Have you been able to get tokens for the Service Account? If so, where it sounds like you're having trouble now is getting a token for your app user.
For the app user, first double check your syntax with the linked guide above, and then double check that the scope to Generate User Access Tokens is enabled both in the dev console for the app and within the "authorization" of the app in the admin console.
Let me know if that helps explain or if I can explain anything more!
Thanks,
Jason
-
So I am able to get a list of file and folders to display, but when you click on them, and a preview of the file shows up, I see a grayed out 'open with' button.
Also, The app is authorized in dev console and admin console to generate tokens and enable integrations. The syntax was copied direct from the dev guide page.
-chris
サインインしてコメントを残してください。
コメント
4件のコメント