@@ -663,7 +663,14 @@ func (c *Client) ChangePasswordWithOneTimePasscode(ctx context.Context, req Chan
663
663
// based authentication to oauth based. The response has the oauth state code
664
664
// to use in the oauth flow.
665
665
func (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 )
667
674
if err != nil {
668
675
return OAuthConversionResponse {},err
669
676
}