I have a requirement wherein I have to upload/download/move files in BOX. I am using the UiPathTeam.Box.Activites . I have followed all the steps mentioned in the document to grant access to the app created in BOX but when i run the workflow i get a error:-Box Scope: One or more errors occurred.
I have all the details like Client ID, Client Secret.I put in the redirect url as UiPathIntegrationApp. I get the authorization code and put it in the scope and try to get refresh token but it fails.
Could you please help me with this. Let me know if you need any other information.
Your workflow looks ok from the picture you posted.
I tried it myself with the OAuth 2 authentication and for my first attempt I got the same error “One or more errors occurred”. I generated another authentication code (steps 5-7 from the documentation), replaced it in the workflow and it worked fine. I don’t know why the first time it did not worked, but the authorization code is valid only once, so you need to generate another one if you get an error.
Can you generate another authorization code and try again?
I have noticed that the box scope gives error after every few min and I have to regenerate code and token. Is this expected or do we have workaround this?
Once you have the Refresh Token (after using the Authorization Code) it is valid for 30 days, if I remember correctly, but it can be used only once. Meaning that when you use the Refresh Token to authenticate in the Box Scope, a new Refresh Token is generated. Next time you should use the new Refresh Token.
You can do that by saving the Refresh Token in an Asset / Config / Text File.
Uses the Authorization Code to generate a Refresh Token.
The Refresh Token is stored in a text file.
It is done manually but should be necessary only first time and if the last generated Refresh Token expired (not used for more than 30 days).
Authenticate to Box Scope using the Refresh Token.
The output of Box Scope - Box Client is stored in a variable and it is used for all subsequent Box Scope activities. It can be also sent as input argument for Invoke Workflow.
After the last Box Scope activity we need to save the Refresh Token into the text file.
This is so helpful. I was trying the same thing. I was going through all the documentatio of BOX API and Python SDK and I found the similar thing as you mentioned about the validity. Thank you so much @Silviu. I really appreciate it.