Reference
Oauth token
Redeems a code with its verifier, or a refresh token, for a new pair of tokens.
POST
application/json- body
grant_type*"authorization_code"Value in
"authorization_code"client_id*"skywake-desktop"Value in
"skywake-desktop"code*stringLength
1 <= length <= 200code_verifier*stringMatch
^[A-Za-z0-9._~-]{43,128}$redirect_uri*stringMatch
^http:\/\/127\.0\.0\.1:(\d{2,5})\/callback$The tokens.
application/json- response
access_token*stringAn API key that works for expires_in seconds.
token_type*"Bearer"Value in
"Bearer"expires_in*integerrefresh_token*stringMakes the next pair, once. Using it twice ends the sign-in.
organization*organizations*array<>Every organization of the person, to switch to by signing in again.
environment*string|nullrole*RoleWhat a caller may do. read: files and history. write: also fork, commit and merge. admin: also keys, namespaces, protected branches and the audit log.
Value in
"read""write""admin"email*string|nullcurl -X POST 'https://example.com/v1/oauth/token' \ -H 'Content-Type: application/json' \ -d '{ "grant_type": "authorization_code", "client_id": "skywake-desktop", "code": "string", "code_verifier": "string", "redirect_uri": "string"}'Example Response
{ "access_token": "string", "token_type": "Bearer", "expires_in": 0, "refresh_token": "string", "organization": { "id": "string", "name": "string" }, "organizations": [ { "id": "string", "name": "string" } ], "environment": "string", "role": "read", "email": "string"}