import base64


def encode_group_id(group_id):
    """Encode group_id as returned by the websocket for use with other endpoints."""
    return "group." + base64.b64encode(group_id.encode("ascii")).decode("ascii")