Skip to content

API reference / Read a connect link

Read a connect link

Look up what a connect link points to before a browser joins.

GET/v1/connect/{token}
Auth None. The connect token in the path is the credential.

Push's connect page calls this to show the project and recipient names and to get the key a browser needs to subscribe. You do not need it: send people a connect link instead. Reading a link does not use it up.

Request#

Path parameters#

token
stringrequired
The token at the end of the connect link.
Rules
cl_ followed by 32 letters and digits

Response#

200 OK. Every field is always present.

project.name
stringrequired
The name of the project the link belongs to.
recipient.name
stringrequired
The recipient the browser will join.
vapidPublicKey
stringrequired
The project's public signing key. A browser must subscribe with it as applicationServerKey.
Rules
base64url
recipientId
stringrequired
The recipient's id. Push uses it to give each recipient its own service worker scope.
Rules
UUID
expiresAt
stringrequired
When the link stops working.
Rules
ISO 8601, UTC
usesLeft
integerrequired
How many more browsers can connect with this link.
Rules
0 or more

Errors#

CodeHTTPWhen
NOT_FOUND404The token is malformed or unknown, the link expired, was revoked or is used up, or its project is suspended. The message is always “This connect link does not exist, has expired or was used up”.
RATE_LIMITED429More than 60 connect requests a minute from one IP address, counting both connect endpoints.
INTERNAL_ERROR500Something failed on Push's side. It is safe to retry.
NoteA suspended project's links answer 404, not 403, so a link never reveals why it stopped working.

Example#

⫻

curl

curl https://api.meslzy.com/push/v1/connect/cl_4Jr8xT2mQ9vLw7NcPz3sKd6YbHf1Ae5U

⫻

200 OK

HTTP/1.1 200 OKContent-Type: application/jsonX-Request-Id: req_0199b1c27a4e7c3d9f1e2b6a8d4c5e11
{  "project": {    "name": "Acme alerts"  },  "recipient": {    "name": "ops"  },  "vapidPublicKey": "BKxQm2v8N3rT6yH1jL5pW9cZ4fD7gS0aE2uI8oK3nM6bV1xC5zR9tY4hJ7lP2wQ8eU0iO3sA6dF9gH1jK4lZ7xC",  "recipientId": "0198f09e-4b1a-7c2d-8e3f-4a5b6c7d8e9f",  "expiresAt": "2026-10-12T09:00:00.000Z",  "usesLeft": 4}