cct-datascience / group-procedures

Quarto book/wiki of group procedures and resources
https://cct-datascience.github.io/group-procedures/
Creative Commons Attribution 4.0 International
0 stars 0 forks source link

add boxr vignette #47

Closed Aariq closed 3 months ago

Aariq commented 5 months ago

Adds technical vignette about programmatic access to Box at UA

diazrenata commented 4 months ago

Oooh, nice! So the methods described here are not the methods I use!

I am using a service app with OAuth to work with box programmatically interactively from my computer. You set the token as an environment variable. This doesn't work on servers.

Next week I can draft an additional section describing what I'm doing, if that sounds helpful?

Aariq commented 4 months ago

I am using a service app with OAuth to work with box programmatically interactively from my computer. You set the token as an environment variable. This doesn't work on servers.

What servers do you mean? This is the setup I'm using for Posit Connect, and I'm not sure why it wouldn't work for other servers. It's maybe a little "weird" to copy paste the contents of the token json file into an env variable, but it should work

Aariq commented 4 months ago

But, yes, please do contribute additional methods if you've found another way!

diazrenata commented 3 months ago

I am using a service app with OAuth to work with box programmatically interactively from my computer. You set the token as an environment variable. This doesn't work on servers.

What servers do you mean? This is the setup I'm using for Posit Connect, and I'm not sure why it wouldn't work for other servers. It's maybe a little "weird" to copy paste the contents of the token json file into an env variable, but it should work

Oh, yeah! I'm sure the way you're describing works. Upon digging, I'm using an interactive app (https://r-box.github.io/boxr/articles/boxr-app-interactive.html), basically to the letter of that tutorial. (Specifically, the method I'm using is to have the BOX_CLIENT_ID and BOX_CLIENT_SECRET set as environment variables. I was not able to get to work on Posit Connect, which is not surprising given the tutorial 😆. I think you described a workaround for that which culminates in the .json file (instead of supplying both the ID and SECRET).

So, for this PR I suggest adding a sentence about interactive apps linking to the documentation, and otherwise keeping this page as it is. I do think it's good to direct future-us to the interactive apps docs, because I don't think I knew about this documentation page - I figured it out independently when I was having trouble with the service app. It's possible the next person won't miss it, but can't hurt to leave the breadcrumbs!

(See 374362e.)

Aariq commented 3 months ago

So, for this PR I suggest adding a sentence about interactive apps linking to the documentation, and otherwise keeping this page as it is. I do think it's good to direct future-us to the interactive apps docs, because I don't think I knew about this documentation page - I figured it out independently when I was having trouble with the service app. It's possible the next person won't miss it, but can't hurt to leave the breadcrumbs!

Ok, I can definitely add that. The interactive apps are only meant for interactive use (i.e. not on a server like Posit Connect), so they're not expected to work, but they are easier to set up I think and useful if you want to do stuff programmatically just on your local computer.