Palbase Machines · API
/machines/github/installationsConnect an installation
Connects an installation of Palbase Cloud the user reaches, with the user's own GitHub token for the App (a CLI's device flow): the project reaches the repositories of it that user can push to — connected again by that user, what they can push to now. Refused when GitHub says the user cannot reach it, or push to any repository of it; and when the project connected it otherwise — by another GitHub user, or for some repositories alone (a share): linking again never widens, narrows or hands over a connection, so it is disconnected and connected anew. The user taking their authorization of the App back on GitHub disconnects what they connected.
Called by your server, with the project's secret key.
Request body
installation_idinteger (int64) · requireduser_tokenstring · requiredcurl -X POST "https://<your-ref>.palbase.studio/machines/github/installations" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"installation_id":1,"user_token":"string"}'Responses
201The installation, connected
400Validation failed or a required field is missing
401Missing or invalid API key
403Not the project's secret key; or the request requires elevated owner authentication (`owner_only`, `insufficient_user_authentication`).
409The project connected the installation otherwise (`installation_scoped`: for other repositories, or some alone where this is for all, or all where this is for some; `installation_linked_by_other`: by another GitHub user) — disconnect it, then connect it anew
429Over the project's request limit, or its machine time for this period is used up
503Temporarily unavailable; retrying is safe after Retry-After
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation LinkInstallation of machines's contract.