Hello, I’m trying to <create an identity via admin...
# ory-network
b
Hello, I’m trying to create an identity via admin api, but I’m not sure what to type in
schema_id
field. Is this the value to use (in the picture)? Currently I’m getting
Copy code
{
  "error": {
    "code": 403,
    "status": "Forbidden",
    "request": "2bac42f5-540b-945a-82e5-....",
    "message": "Access credentials are not sufficient to access this resource"
  }
}
But It’s also actually my first time trying to access the API with a key (any health check I should run before?)
f
Hey, schemaid is the ID of schema that will be used to validate the identity traits. You’re making a call with personal access token?
b
Yes,
Copy code
Authorization: Bearer ory_pat_XXXXXX
b
As far as I know, you can’t get the schema_id from UI so here is what I did: I was able to get schema_id by calling this endpoint (this will list all schemas): https://www.ory.sh/docs/reference/api#operation/listIdentitySchemas Then I tried to match the schema I modified in UI and I got the id from API (hope it makes sense) P.S: Maybe you should match them by date created.
Maybe another way would be to watch Network requests on ‘Identity Schema’ page.
b
Thank you both for your help. I am now able to POST identity. 1. My url had the “playground” as base host instead of my unique project Id (I’m a newbie) 🤦‍♂️ 2. The schema ID was indeed correct as I copied-pasted it from the Cloud’s Identity screen (in the original post image) Thanks for the help!!
b
You should GET it
b
Yes, I got the schema’s as you suggested. But that information is also available as plain text in the web cloud
Just noted that for future reference
b
Have you created a new schema ?
Or you are using a default one ?
b
new schema, yes, and 2 users already with that schema registered
🙌 2
f
cool! 🙂