Traccar API,用户信息更新失败

Traccar API, user information updating failed

我正在尝试更新 android 中的 traccar 用户密码,在我看到的文档中,使用 PUT 必须发送用户 ID 和要更新的信息,我已经尝试过了:

@PUT("users")
Call<Users> updateUserInformation(@Header("authorization") String credentials,
                                  @Query("id") int id,
                                  @Body Users users);

我尝试使用已签名用户的凭据和 super_user 的凭据,显示的错误是:

"Method not allowed" okhttp3.ResponseBody@7750b1

我也试过将 id 作为字段发送

@Field("id") int id

但还是不行。

不知有没有人知道traccar中如何更新用户信息

Traccar 使用标准 REST API 约定。您需要 URL:

中的用户 ID
@PUT("users/{id}")
Call<User> updateUserInformation(@Path("id") long userId, ...);