Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I'm hoping someone can help me with the following issue.
I am using the tBoxConnection component to authenticate and access box.net cloud storage - to do this I need to provision, alongside my client key and secret, an access token and refresh token. The issue is that the access token expires each time it is used.
I can obtain a new access key via the box.net API using a tRest component, this also expires and provisions a new refresh token. I therefore need to store and retreive these token within the job i.e.
step 1- tRest (use the old refresh token to get new access/refresh token via box.net api) ->
step 2- tExtractJSONfields/tSetGlobalVar (extract tokens from JSON response and store as global variables) ->
step 3- tBoxConnection (use tokens as global variables to authenticate access to storage)
The issue is that the refresh token is lost as a global variable at the end of the job run, so when I come to re-run the job I cannot re-use the refresh token to obtain a new set of access/refresh tokens. I also would like to run this serverlessly via the cloud platform, so hence storing the keys in e.g. a csv file is not an option.
Can anyone help, or else recommend an alternate working authentication method?
Hello,
Would you mind posting your job design screenshots here which will be helpful for us to address your issue?
Best regards
Sabrina
Many thanks for your offer of assistance, see below for a screengrab of the job
I was able to simply connect using the tBoxConnection component and using the Box Custom App - Server Credentials (Client Credentials Grant) option.
Under the configuration tab, the Client ID goes in the Client Key field. The generated Primary Access Token is both the Client Secret and the Access Token.
This creates a new application service user with an initial 10GB limit that you'll need to add collaborators or add to to have access to your files.