# Collaborating on one Binder instance

**URL:** <https://discourse.jupyter.org/t/collaborating-on-one-binder-instance/407>\
**Category:** Binder\
**Tags:** tip\
**Created:** [February 20, 2019, 10:31pm UTC](https://discourse.jupyter.org/t/collaborating-on-one-binder-instance/407 "2019-02-20T22:31:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![saulshanabrook](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/saulshanabrook/32/159_2.png) [@saulshanabrook](https://discourse.jupyter.org/u/saulshanabrook)\
**Post date:** [February 20, 2019, 10:31pm UTC](https://discourse.jupyter.org/t/collaborating-on-one-binder-instance/407/1 "2019-02-20T22:31:07Z")

</div>

Normally, if you try to share a link to your active binder, you will get an error like this:

 ![25%20PM](https://canada1.discourse-cdn.com/flex031/uploads/jupyter/original/1X/f649be64fa7305c230067eacc4b1ff58b8598d82.png)

The issue is that you don’t have the authentication token for the session. You can get this token, however, by running the `jupyter notebook list` command in the terminal. If you are in JupyterLab go to `File > New > Terminal`. For me, it looks like this:

```auto
jovyan@jupyter-jupytercalpoly-2drich-2dcontext-2ddemo-2d76a9qi1l:~$ jupyter notebook list
Currently running servers:
http://0.0.0.0:8888/user/jupytercalpoly-rich-context-demo-76a9qi1l/?token=m8mGhkqcSDWmcpuNqF1Hgw :: /home/jovyan

```

All we need to do now is copy that URL, but replace the host of `http://0.0.0.0` with `https://hub.mybinder.org`. In this case it would be `https://hub.mybinder.org/user/jupytercalpoly-rich-context-demo-76a9qi1l/?token=m8mGhkqcSDWmcpuNqF1Hgw`. Now if you are that URL with someone else, they will be able to connect to this same container. That means, if you save a file they will be able to see it.

We are using this for a [demo of the new Rich Context](https://github.com/jupytercalpoly/rich-context-demo) work to try out multiple users commenting on a notebook at the same time, backed by a singular GraphQL server.

---

<div class="post-metadata">

**Author:** ![choldgraf](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/choldgraf/32/1264_2.png) [@choldgraf](https://discourse.jupyter.org/u/choldgraf)\
**Post date:** [February 21, 2019, 3:30am UTC](https://discourse.jupyter.org/t/collaborating-on-one-binder-instance/407/2 "2019-02-21T03:30:43Z")

</div>

whoahhh y’all are at the bleeding edge of binder 🙂

---

<div class="post-metadata">

**Author:** ![saulshanabrook](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/saulshanabrook/32/159_2.png) [@saulshanabrook](https://discourse.jupyter.org/u/saulshanabrook)\
**Post date:** [February 21, 2019, 4:28am UTC](https://discourse.jupyter.org/t/collaborating-on-one-binder-instance/407/3 "2019-02-21T04:28:50Z")

</div>

It’s great to be able to stand on the shoulders of all this work 😃

---

<div class="post-metadata">

**Author:** ![betatim](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/betatim/32/10_2.png) [@betatim](https://discourse.jupyter.org/u/betatim)\
**Post date:** [February 21, 2019, 6:32am UTC](https://discourse.jupyter.org/t/collaborating-on-one-binder-instance/407/4 "2019-02-21T06:32:48Z")

</div>

Nice!

The [Gesis BinderHub](https://notebooks.gesis.org/binder/v2/gh/binder-examples/requirements/master) has button in the top right of every binder

 ![17](https://canada1.discourse-cdn.com/flex031/uploads/jupyter/original/1X/44cd5fcc043cb36ec6a162354907b5260f398d3d.png)

that give you the link for sharing your instance/session. We’ve discussed adding all the buttons except for the “copy session link” to [mybinder.org](http://mybinder.org) (not quite sure why we haven’t done it :-/). Should we re-discuss having that button? I still feel that it would encourage people to share something which is similar to a password and so we shouldn’t … but I know people have been doing this for a while and it allows cool features like the on shown in this thread. Maybe we could make the button one that needs confirming?

---

<div class="post-metadata">

**Author:** ![psychemedia](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/psychemedia/32/24_2.png) [@psychemedia](https://discourse.jupyter.org/u/psychemedia)\
**Post date:** [February 21, 2019, 11:29am UTC](https://discourse.jupyter.org/t/collaborating-on-one-binder-instance/407/5 "2019-02-21T11:29:10Z")

</div>

> [@betatim](#):
>
> I still feel that it would encourage people to share something which is similar to a password and so we shouldn’t …

Lots of document share systems have a ‘share’ link with semantics of ‘this document will be viewable to people with access to this link’.

The Binder notebook instances are also temporary / ephemeral, so sharing is only for as long as the instance is running and then the toke is null and void anyway.

---

<div class="post-metadata">

**Author:** ![ellisonbg](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/ellisonbg/32/14_2.png) [@ellisonbg](https://discourse.jupyter.org/u/ellisonbg)\
**Post date:** [March 27, 2019, 4:31pm UTC](https://discourse.jupyter.org/t/collaborating-on-one-binder-instance/407/6 "2019-03-27T16:31:21Z")

</div>

Maybe a JupyterLab extension for binder that copies a sharable link to the clipboard?

---

<div class="post-metadata">

**Author:** ![jhermann](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jhermann/32/257_2.png) [@jhermann](https://discourse.jupyter.org/u/jhermann)\
**Post date:** [March 27, 2019, 7:56pm UTC](https://discourse.jupyter.org/t/collaborating-on-one-binder-instance/407/7 "2019-03-27T19:56:41Z")

</div>

> [@betatim](#):
>
> Maybe we could make the button one that needs confirming?

Just pop up a dialog with the link and an explanation of how to handle it correctly.

---

<div class="post-metadata">

**Author:** ![yuvipanda](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/yuvipanda/32/17_2.png) [@yuvipanda](https://discourse.jupyter.org/u/yuvipanda)\
**Post date:** [July 16, 2020, 8:04pm UTC](https://discourse.jupyter.org/t/collaborating-on-one-binder-instance/407/8 "2020-07-16T20:04:26Z")

</div>

If you wanna just get this token in a oneliner, try:

```auto
jupyter notebook list --json | python3 -c 'import json; import sys; print(json.load(sys.stdin)["token"])'

```

You can then use the URL to your binder server instance (with the random chars), add `?token=<token>` and pass it to someone. Then they will share your session, for things like this.

---

<div class="post-metadata">

**Author:** ![choldgraf](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/choldgraf/32/1264_2.png) [@choldgraf](https://discourse.jupyter.org/u/choldgraf)\
**Post date:** [July 18, 2020, 1:43am UTC](https://discourse.jupyter.org/t/collaborating-on-one-binder-instance/407/11 "2020-07-18T01:43:11Z")

</div>

oops! I added it in by directly editing yuvi’s post as administrator, I hope that’s OK yuvi!

---

<div class="post-metadata">

**Author:** ![jtp](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jtp/32/19100_2.png) [@jtp](https://discourse.jupyter.org/u/jtp)\
**Post date:** [January 14, 2021, 2:42pm UTC](https://discourse.jupyter.org/t/collaborating-on-one-binder-instance/407/12 "2021-01-14T14:42:16Z")

</div>

Just published a JupyterLab extension to make this easier to use and a bit more user friendly:

- GitHub: [GitHub - jtpio/jupyterlab-link-share: JupyterLab Extension to easily share a link to a running server on Binder](https://github.com/jtpio/jupyterlab-link-share)
- PyPI: [jupyterlab-link-share · PyPI](https://pypi.org/project/jupyterlab-link-share/)
- conda-forge: - conda-forge: [https://anaconda.org/conda-forge/jupyterlab-link-share](https://anaconda.org/conda-forge/jupyterlab-link-share)

Which can be installed with `pip install jupyterlab-link-share`. Or added to the `requirements.txt` on Binder.

For now it’s only on PyPI and for JupyterLab 3.0, but if folks find it useful we can package it for `conda` too.

**EDIT** : now available on conda-forge too
