Skip to content

lk token create works even though the URL is not given #800

@utezduyar

Description

@utezduyar

I can run lk token create without specifying URL, or without running a local server.

% lk --version
lk version 2.15.0

% echo $LIVEKIT_URL
{nothing returned}

% telnet localhost 7880
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host

Note that I don't have the URL in the environment variable, I don't have a livekit server running locally. It prints the Project URL as localhost but it cannot be true. The returned token is a legitimate token that I can use towards my LiveKit Cloud websocket endpoint.

% lk token create \                                                                                 
      --api-key ..... \
      --api-secret .... \
      --identity mac \
      --room test-room \
      --join
valid for (mins):  5
Token grants:
{
  "identity": "mac",
  "name": "mac",
  "video": {
    "roomJoin": true,
    "room": "test-room"
  }
}

Project URL: http://localhost:7880
Access token: .....

Same thing doesn't work for ingress

% lk ingress list --api-key ..... --api-secret .....
twirp error internal: failed to do request: Post "http://localhost:7880/twirp/livekit.Ingress/ListIngress": dial tcp [::1]:7880: connect: connection refused

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions