So, here's the context:
I'm launching apps from Shiny Proxy, which is a server service for R applications (but that's not the core question).
What this service does is launching a new webpage each time a user connects, with the url (for example) http://<url>:<port>/app/01_hello/endpoint/xyzabcdef/
, for example — the id of the endpoint being randomly assigned, the stable url being http://<url>:<port>/app/01_hello
.
I have on this app (01_hello), a button that sends a request for Oauth. If I am on an already launched app, I can go to the google dev console, and manually enter http://<url>:<port>/app/01_hello/endpoint/xyzabcdefghijklm/
as an authorized URI. And that works.
The thing is that each time I relaunch this app, a new endpoint id is randomly generated. So I can't anticipate what the endpoint will be for future user.
I can catch this id with JavaScript, and send it back to my server.
So my question is: once I get this id back on my server, is there a way to programmatically (in command line) send this url/endpoint/id to the developper console so that this url is authorized?
Maybe there is another (more elegant) way to do this?
Any idea is welcome.