I created a python toolbox with the following code:
from arcgis.gis import GIS
gis = GIS("my portal url", client_id='my client id')
When I run the toolbox, a browser pops up with a OAuth2 Approval code which is expected. (see screenshot).
The question is how can I paste that code back into my running toolbox?
