Update user details via API
    Answered

Hi!

How would you update user details via the API? I don't see any update methods for existing users in the API documentation. In my case, I would like to go over each user and update their custom fields.

By the way, you might want to update the link at the bottom of this page (it's inaccessible): https://userecho.com/dev/api/reference/

Share
-1
Vladimir Mullagaliyev
Under review

Hello,


We are going to add "update" method for object "User" soon.

Will let you know in this topic.

neochief

Thanks!

Vladimir Mullagaliyev
Answer Answered

Hello,


We've added a new method to update user's profile information. Please find out more information here https://userecho.com/dev/api/users/update

neochief

I have a follow-up question regarding updaing user language via API.

I send the PUT request to here:

https://refactoring.userecho.com/api/v2/users/1.json?access_token=XXX

With this payload:


{
  "language": "en"
}

As a result, I get an HTML page with an error "Здається, щось пішло не так." (it looks like a localized error page of the userecho, not an API anser)

My project does have the English language enabled, so I'm not sure what might be wrong. When I try to update other fields, everything works fine.

neochief

I can provide the exact API links with access tokens, if you make this ticket private.

Vladimir Mullagaliyev

I think we've fixed the problem already. Please try again.

neochief

Yeah, works perfectly now. Is there a reason why you don't expose the avatar field in the update command? If no, it would be nice to be able to update it as well.

neochief

Here's another issue:

PUT https://refactoring.userecho.com/api/v2/users/195.json?access_token=XXX

{
  "name": "Paulo Henrique Lerbach Rodrigues"
}

Same error page as before. It might be related to the username length. If so, it would be great to see this limit described in API docs.

Vladimir Mullagaliyev
Quote from neochief

Here's another issue:

PUT https://refactoring.userecho.com/api/v2/users/195.json?access_token=XXX

{
  "name": "Paulo Henrique Lerbach Rodrigues"
}

Same error page as before. It might be related to the username length. If so, it would be great to see this limit described in API docs.

Unfortunately, the name cannot be longer than 30 chars. You will not get the error next time. It will be shortened to 30 chars automatically.

neochief

Well, it looks that I managed to sync all my accounts successfully. Thanks for your support guys!


Sign in to leave a comment