Hi Guys, I have a question regarding <https://www....
# ory-network
f
Hi Guys, I have a question regarding https://www.ory.sh/docs/reference/api#tag/identity/operation/updateIdentity API - from the doc it seems it should be possible to use it to update identity's password, but I cannot make it work. It just ignores the password I send, nevermind if it's plain text or hashed. Still it returns status 200. What's the trick to make it work?
b
Are you able to update other things like
metadata_public
? I'm having a similar issue here trying to set that. Haven't been able to get the PATCH method to work either.
Copy code
# returns 200 but metadata_public is still null
curl --location --request PUT '<http://our-url/admin/identities/our-id>' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data-raw '{
    "schema_id": "<preset://email>",
    "state": "active",
    "traits": {
        "email": "<mailto:email@email.com|email@email.com>"
    },
    "metadata_public": { 
        "foo": "bar"
    },
    "metadata_admin": null
}'
s
how did you determine that the update did not work? was it not reflected in the session whoami, not reflected in the PUT response, or not reflected in a subsequent GET?
i.e. how to reproduce?
f
it was not reflected in the PUT response and in the subsequent GET requests - the password version and update dates did not change. and I cannot log into my app with the new password, still have to use the old one
b
> it was not reflected in the PUT response and in the subsequent GET requests Same here for updating metadata_public
f
you're right, updating metadata_public via a PATCH request doesn't work either. and it did a few days back. now this is a blocking issue for us. are you aware of it? @steep-lamp-91158?
s
ok, I tried and cannot reproduce can you try again and get me 1. identity ID 2. project ID 3.
ory-request-id
response header
f
ok, pasting the details in private chat helped me realize my mistake 🤦‍♂️ the patch paths should start with
/metadata_public
@bland-finland-95044 you might want to make sure you didn't make the same mistake
👍 1
b
I figured out my issue... I was pointed at http://our-subdomain.com, not https://our-subdomain.com. Strange that the http address returned 200 and just didn't do anything, but anyway, that resolved my issue