Skip to content
Ona Docs

GetSSOLoginURL

client.accounts.getSSOLoginURL(AccountGetSSOLoginURLParams { email, returnTo } body, RequestOptionsoptions?): AccountGetSSOLoginURLResponse { loginUrl }
POST/gitpod.v1.AccountService/GetSSOLoginURL

Gets the SSO login URL for a specific email domain.

Use this method to:

  • Initiate SSO authentication
  • Get organization-specific login URLs
  • Handle SSO redirects

Examples

  • Get login URL:

    Retrieves SSO URL for email domain.

    email: "user@company.com"
  • Get URL with return path:

    Gets SSO URL with specific return location.

    email: "user@company.com"
    returnTo: "https://gitpod.io/workspaces"
ParametersExpand Collapse
body: AccountGetSSOLoginURLParams { email, returnTo }
email: string

email is the email the user wants to login with

formatemail
returnTo?: string | null

return_to is the URL the user will be redirected to after login

formaturi
ReturnsExpand Collapse
AccountGetSSOLoginURLResponse { loginUrl }
loginUrl: string

login_url is the URL to redirect the user to for SSO login

GetSSOLoginURL

import Gitpod from '@gitpod/sdk';

const client = new Gitpod({
  bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});

const response = await client.accounts.getSSOLoginURL({ email: 'user@company.com' });

console.log(response.loginUrl);
{
  "loginUrl": "loginUrl"
}
Returns Examples
{
  "loginUrl": "loginUrl"
}