update API tokens doc to match current API tokens page
[arvados.git] / doc / user / api-tokens.md
index 84f3fdfe87d84737d093809d6f1e08bce20c57b1..7a02d21e15b928a2c385d40eec449e4f969d1fd5 100644 (file)
@@ -5,7 +5,7 @@ title: Getting an API token
 navorder: 1
 ---
 
-# API authentication
+# Getting an API token
 
 Open a browser and point it to the Workbench URL for your site. It
 will look something like this:
@@ -16,11 +16,27 @@ Log in, if you haven't done that already.
 
 Click the "API tokens" link.
 
-Copy an API token and set environment variables in your terminal
-session like this.
+At the top of the "API tokens" page, you will see a few lines like this.
 
-    export ARVADOS_API_TOKEN=unvz7ktg5p5k2q4wb9hpfl9fkge96rvv1j1gjpiq
-    export ARVADOS_API_HOST={{ site.arvados_api_host }}
+    ### Pasting the following lines at a shell prompt will allow Arvados SDKs
+    ### to authenticate to your account, youraddress@example.com
+    
+    read ARVADOS_API_TOKEN <<EOF
+    2jv9kd1o39t0pcfu7aueem7a1zjxhak73w90tzq3gx0es7j1ld
+    EOF
+    export ARVADOS_API_TOKEN ARVADOS_API_HOST=qr1hi.arvadosapi.com
+
+Paste those lines into your terminal window to set up your
+terminal. This effectively copies your credentials from your browser
+to your terminal session.
+
+Now, `arv -h user current` will display your account info in JSON
+format.
+
+Optionally, copy those lines to your .bashrc file so you don't have to
+repeat this process each time you log in.
+
+### SSL + development mode
 
 If you are using a local development server with a self-signed
 certificate, you might need to bypass certificate verification. Don't