diff --git a/internal/bitwarden/webapi/client.go b/internal/bitwarden/webapi/client.go index 7c7f6e7..c12cdbc 100644 --- a/internal/bitwarden/webapi/client.go +++ b/internal/bitwarden/webapi/client.go @@ -282,6 +282,7 @@ func (c *client) LoginWithPassword(ctx context.Context, username, password strin return nil, fmt.Errorf("error preparing login with password request: %w", err) } httpReq.Header.Add("Auth-Email", base64.StdEncoding.EncodeToString([]byte(username))) + httpReq.Header.Add("Device-Type", c.deviceType) tokenResp, err := doRequest[TokenResponse](ctx, c.httpClient, httpReq) if err != nil { @@ -399,6 +400,7 @@ func (c *client) prepareRequest(ctx context.Context, reqMethod, reqUrl string, r if len(c.sessionAccessToken) > 0 { httpReq.Header.Add("authorization", fmt.Sprintf("Bearer %s", c.sessionAccessToken)) } + httpReq.Header.Add("Accept", "application/json") return httpReq, nil }