Skip to content
Sign in Waitlist
Docs/API reference/Connections/Start network connection

Start network connection

GET /v1/connections/:network/start scope write

Starts the OAuth login for youtube, tiktok or meta (Instagram) and returns the authorization URL. Another account on the same network becomes another channel; the same account is reconnected. With meta you can pass replace=true (replaces the token of an existing connection), add=true (connects ANOTHER Instagram account as a new channel), instagram=<username>, instagram_id=<id|current> and probe=true (reports only, stores nothing).

HeadersAuthorization: Bearer praeko_… and X-Praeko-Contract: en. Always send both.

Legacy Portuguese alias (still answered, marked as deprecated): /v1/conexoes/:rede/iniciar.

Parameters

Name In Description
network path Network: youtube, instagram or tiktok.
replace query meta only: true replaces the token of an existing connection.
add query meta only: true connects ANOTHER account as a new channel.
probe query meta only: true only reports, stores nothing.

Example

curl "https://praeko.app/v1/connections/youtube/start" \
  -H "Authorization: Bearer $PRAEKO_KEY" \
  -H "X-Praeko-Contract: en"

Response

Success status When
200 Success.
Response 200
{
  "url": "https://accounts.google.com/o/oauth2/v2/auth?client_id=1234567890-abc.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fpraeko.app%2Fconexoes%2Fyoutube%2Fretorno&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube.upload+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube.force-ssl+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyt-analytics.readonly&code_challenge=D0BtvxL1QkepqaFLJJS5wrahCRBAulz64NHqFygjhnE&code_challenge_method=S256&state=ISfuXJZxVw4VCiEfWGEhY96pfpYA0YEo&access_type=offline&prompt=consent",
  "redirect": "https://praeko.app/conexoes/youtube/retorno",
  "expiresAt": "2026-11-07T14:12:11.482Z",
  "warning": "open the url in a browser, authorize and come back; the callback lands on this service"
}

The shape of the response changes by network and option (meta with probe=true only reports, without storing anything); url is what you open in the browser. warning is free text the server writes in Portuguese; the example shows it in English.

Errors

No errors specific to this route besides the common ones.

Errors on any route

Status code When
401 unauthorized The Authorization: Bearer … header is missing.
401 invalid_api_key The key does not exist.
401 revoked_api_key The key has been revoked.
401 expired_api_key The key has expired.
403 forbidden The key's scope is not enough for this route (see the scope badge).
429 rate_limited The per-minute request limit was exceeded.

The body of every error is { "error": { "code", "message", "details"? } }. See all error codes.

Try it

Try it

The live test uses your key and your account. It stays off when you are not signed in.

Sign in to try it
Question or mistake on this page? contato@praeko.appView .md

Type to search pages, routes and error codes.