BP-REST icon indicating copy to clipboard operation
BP-REST copied to clipboard

Update the logged in member "code": "rest_user_invalid_id"

Open ranfen opened this issue 3 years ago • 4 comments
trafficstars

Hi I tried to update the logged-in user Display name using REST API I got this Error Update the logged in member "code": "rest_user_invalid_id", "message": "Invalid user ID.",

i fellowed the documentation: Update the logged in member

iScreen Shoter - 20220829085415708

ranfen avatar Aug 29 '22 13:08 ranfen

Are you authenticated? This error implies the current user is not logged in.

renatonascalves avatar Aug 29 '22 13:08 renatonascalves

Yes I am authenticated, all the other API endpoints works great, I was able to update xprofile fields

ranfen avatar Aug 29 '22 13:08 ranfen

@ranfen I can't reproduce this issue. 🤔

renatonascalves avatar Oct 02 '22 00:10 renatonascalves

@ranfen I can't reproduce this issue. 🤔

So what should we do?

ranfen avatar Oct 13 '22 09:10 ranfen

I confirm @renatonascalves test. The endpoint behaves as expected. I've just tested using the code we're suggesting in https://developer.buddypress.org/bp-rest-api/reference/members/#update-the-logged-in-member

@ranfen I advise you to check the nonce header has been sent by your request.

For now and with no other inputs. I'm closing this issue.

imath avatar Dec 06 '22 05:12 imath