diff --git a/docs/apiclient.rst b/docs/apiclient.rst index 2806ebe86..4bfb7fe79 100644 --- a/docs/apiclient.rst +++ b/docs/apiclient.rst @@ -24,6 +24,18 @@ To obtain an admin API token, navigate to the "Settings" tab in your Studio proj >>> from fedn import APIClient >>> client = APIClient(host="", token="", secure=True, verify=True) +Alternatively, the access token can be sourced from an environment variable. + +.. code-block:: bash + $ export FEDN_AUTH_TOKEN= + +Then passing a token as an argument is not required. + +.. code-block:: python + + >>> from fedn import APIClient + >>> client = APIClient(host="", secure=True, verify=True) + **Set active package and seed model** @@ -78,4 +90,4 @@ And the following code snippet shows how to get a specific session: session = client.get_session(id="session_name") -For more information on how to use the APIClient, see the :py:mod:`fedn.network.api.client`, and the example `Notebooks `_. +For more information on how to use the APIClient, see the :py:mod:`fedn.network.api.client`, and the example `Notebooks `_.