@@ -663,7 +663,14 @@ func (c *Client) ChangePasswordWithOneTimePasscode(ctx context.Context, req Chan
663663// based authentication to oauth based. The response has the oauth state code
664664// to use in the oauth flow.
665665func (c * Client )ConvertLoginType (ctx context.Context ,req ConvertLoginRequest ) (OAuthConversionResponse ,error ) {
666- res ,err := c .Request (ctx ,http .MethodPost ,"/api/v2/users/me/convert-login" ,req )
666+ return c .ConvertUserLoginType (ctx ,Me ,req )
667+ }
668+
669+ // ConvertUserLoginType will send a request to convert the user from password
670+ // based authentication to oauth based. The response has the oauth state code
671+ // to use in the oauth flow.
672+ func (c * Client )ConvertUserLoginType (ctx context.Context ,user string ,req ConvertLoginRequest ) (OAuthConversionResponse ,error ) {
673+ res ,err := c .Request (ctx ,http .MethodPost ,fmt .Sprintf ("/api/v2/users/%s/convert-login" ,user ),req )
667674if err != nil {
668675return OAuthConversionResponse {},err
669676}