Hi all, I'm running into a 403 issue creating iden...
# talk-kratos
l
Hi all, I'm running into a 403 issue creating identities with the js client library for my invite service. The rest of the admin endpoints work fine with an insecure connection. Has anybody else encountered this?
Copy code
const identity: AxiosResponse<Identity> = await this.ory.identity
      .createIdentity({
        createIdentityBody: {
          schema_id: this.config.get('ORY_KRATOS_IDENTITY_SCHEMA'),
          traits: {
            name: {
              first: invite.firstName,
              last: invite.lastName,
            },
            email: invite.email,
          },
        },
      })
      .catch((e: AxiosError) => {
        this.logger.error(`Error creating Ory Identity for invite ${JSON.stringify(invite)}`, e);
        throw new Error(e.response?.statusText);
      });
Copy code
{
  "message": "Request failed with status code 403",
  "name": "Error",
  "stack": "Error: Request failed with status code 403\n    at createError (C:\\Users\\XXXX\\IdeaProjects\\XXXX\\node_modules\\@ory\\client\\node_modules\\axios\\lib\\core\\createError.js:16:15)\n    at settle (C:\\Users\\XXXX\\IdeaProjects\\XXXX\\node_modules\\@ory\\client\\node_modules\\axios\\lib\\core\\settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (C:\\Users\\XXXXX\\IdeaProjects\\XXXXX\\node_modules\\@ory\\client\\node_modules\\axios\\lib\\adapters\\http.js:269:11)\n    at IncomingMessage.emit (node:events:539:35)\n    at endReadableNT (node:internal/streams/readable:1345:12)\n    at processTicksAndRejections (node:internal/process/task_queues:83:21)",
  "config": {
    "url": "<http://localhost:4433/admin/recovery/link>",
    "method": "post",
    "data": "{\"identity_id\":\"21a24812-aa01-489b-8b58-5de0865f9c83\",\"expires_in\":\"24h\"}",
    "headers": {
      "Accept": "application/json, text/plain, */*",
      "Content-Type": "application/json",
      "User-Agent": "axios/0.21.4",
      "Content-Length": 73
    },
    "transformRequest": [
      null
    ],
    "transformResponse": [
      null
    ],
    "timeout": 0,
    "xsrfCookieName": "XSRF-TOKEN",
    "xsrfHeaderName": "X-XSRF-TOKEN",
    "maxContentLength": -1,
    "maxBodyLength": -1,
    "transitional": {
      "silentJSONParsing": true,
      "forcedJSONParsing": true,
      "clarifyTimeoutError": false
    }
  }
}
This is with the package
@ory/client
``1.1.41`` and a kratos docker container v1
I think I might have created a ticket about this a while ago, but I can't find it