I didn't find any method under Hipchat API V2 docs to reactivate deleted users. Is it possible using REST API V2?
I was able to successfully send a v2/user DELETE call to HipChat to deactivate a user, then reactivate the same user with a v2/user POST. I verified the user's active/deactivated status with the HipChat web interface to confirm that the calls were successful.
Additionally, the request body for the POST included a full response from a v2/user GET.
Here's a sample of the JSON body passed through the POST:
{ "created": "2017-03-30T21:02:05+00:00", "email": "username@example.com", "group": { "id": 1, "links": { "self": "https://example.hipchat.com/v2/group/1" }, "name": "Example" }, "id": 4347, "is_deleted": false, "is_group_admin": false, "is_guest": false, "last_active": null, "links": { "self": "https://example.hipchat.com/v2/user/4347" }, "mention_name": "ExampleMention", "name": "Example Name ", "photo_url": "https://example.hipchat.com/img/silhouette_125.png", "presence": null, "roles": [ "user" ], "timezone": "UTC", "title": "", "version": "4POMLGPU", "xmpp_jid": "1_4347@chat.btf.hipchat.com" }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great! I'm glad to hear that, Yogendra!
Could you please mark the answer as Accepted for anyone else that stumbles on this problem? :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.