Note #
First, configure all other parameters in secret.conf
, and set the auth_code
at the very end. Generating the authorization code from Box requires additional steps, and since the code is only valid for 30 seconds, you must add it to secret.conf
and start the connector within that time window.
Specifications #
[secret-stanza-name]
client_id = Box client id
client_secret = Box client secret
auth_code = authorization code
Example #
[box_creds]
client_id = aes$hnxIY2NdERnasYOJlXXXXXXXXqjCpWYsDD64cpX5fb
client_secret = aes$YZ3DZ0HU9a1iUAR9CiXXXXXXXXfJ7WzlYcDVrX1akx
auth_code = aes$P8UvPxcCr6KXXXXXXXX5g9Si7N+wBOYrbYTjFfXXXX
Steps to obtain Authorization Code #
- To obtain the initial auth_code for the connector:
- Construct the Authorization URL:
# Replace `YOUR_CLIENT_ID` with the actual client ID :
https://account.box.com/api/oauth2/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=https://dataelicit.com/callback
# Example:
https://account.box.com/api/oauth2/authorize?response_type=code&client_id=44r951ug72znzqt821n87r84espqom&redirect_uri=https://dataelicit.com/callback
- Open the URL in a browser (Log in using the Box account used to create the app)
- Click the Grant Access button.
- Copy the value of the `Auth code` parameter.
- Open
secret.conf
in thelocal/
directory and paste theauth_code
. - Start or Restart the Connector.
Important #
This code is only valid for 30 seconds, so you must add it to secret.conf
and start the connector within that time frame.
Troubleshooting #
If you see “Authorization code authentication failed
” error in var/log/box/auth.log. The auth_code
likely expired. Regenerate it by the above steps again.