Changing the destination of file uploads
AnsweredI'm just looking for some verification here -- is this how it's done or is there a better/easier way?
I have a server-to-server app using a JWT JSON token file for Box access. It works fine with my Developer account. We're now ready to integrate it with our paid Business account. I have the app authorized on the Business account and on my first test, the file was still going to my Dev account. On a hunch, I copied the Business Enterprise Id to the JSON file and tried again and now it goes to the Business account as I wanted.
Is that all there is to it? Is that the Box "official" way to do it? A link to the docs (where I should have read this -- sorry!) will be appreciated.
-
That's the correct approach. For future viewers of this thread, here are the complete steps to authenticate a Box application using JWT authentication to another Box enterprise:
- Get your application's client id from the application configuration page in the Box developer console. The URL format for that page is https://app.box.com/developers/console/app/YOUR_APP_ID/configuration.
- Ask the Box Admin for the other Box enterprise to authorize your application on the Apps page of the Admin Console. The Box Admin will need to navigate to the Custom Applications section on that page, click Authorize New App, and enter your application's client id in that field. The URL format for that page is https://app.box.com/master/settings/openbox
- Ask the Box Admin for their enterprise id, which can be found on the Account Info page in the Admin Console. The URL format for that page is https://app.box.com/master/settings/account.
- In the JWT config file that you downloaded from the Box developer console, replace the enterprise id with one for the Box enterprise id you need to authenticate to. You can now generate a enterprise access token using JWT authentication that will let you access content in the other Box enterprise.
Please sign in to leave a comment.
Comments
1 comment