0
Answered

Update user details via API

neochief 3 months ago in API • updated 3 months ago 10

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/

Answer

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

GOOD, I'M SATISFIED

Awesome, thanks!

Btw, it might be worth adding the method create_or_update

Satisfaction mark by neochief 3 months ago
-1
Under review

Hello,


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

Will let you know in this topic.

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

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.

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

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

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.

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.

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