Creating an API key without org_id: "Attempting to access a non owned key"

Hello all,

I’ve created an API key using the REST gateway API without an organisation ID (org_id) and it seems like i cannot retrieve it in the dashboard: “Attempting to access a non owned key”

Is this somehow connected to the dashboard user’s org_id which is not set in the created key?

How is this related to the API i’m generating the key for? That API has an org_id but i don’t know what happens when the API key is created without an org_id.

@Martin any ideas here?

It is expected that you can’t find key without org ID in dash, since it force specific key format.

While this key still can be used by gateway, you will be able to manage it manually.

Can you clarify your use case?

Hi

All of the Dashboard API calls exist within the context of the organisation id their credentials are from. To create a key you can query effectively please use the dashboard API to create it, not the Gateway API.

https://tyk.io/docs/tyk-dashboard-api/api-keys/#generate-a-key

Thanks
Josh