Not able to create same custom app key for different organization

Hi

I am creating custom app key using management server calls below

1. First delete the existing app key (consumer key) using

http://docs.apigee.com/management/apis/delete/organizations/%7Borg_name%7D/developers/%7Bdeveloper_e...

2. Then Create Custom app key (consumer key) using

http://docs.apigee.com/management/apis/post/organizations/%7Borg_name%7D/developers/%7Bdeveloper_ema...

I was able to create the custom consumer key, it works fine in one organization but when I tried to create the same consumer key in different organization, it gives me below error with Http status code as 409 CONFLICT

{
    "code": "keymanagement.service.ConsumerKeyAlreadyExists",
    "message": "ConsumerKey already exists",
    "contexts": []
}
1 4 667
4 REPLIES 4

I have observed same issue, I also cannot add same apiKey in different organization...
it is strange, organizations doesn't share APIs, users and apps... so why this issue?

Hmmm, this is interesting. I'll do some testing and see if we can diagnose the problem. In the meantime, you have a reasonable workaround, correct?

I don't see any real workaround other than forcing my customer to change his key. PS. I'm using private (self-hosted) Apigee version (v 16.09).

Ahhh, maybe that is the issue. Yes, one possible workaround is for the client to change the key when moving from one organization to another.

Another possible workaround:

the API proxy can intelligently apply a transform at runtime on the passed-in key. When running in "org2", perhaps the proxy prepends "org2-" to the key before attempting to verify it. This implies that when you import the key into a new org, you import a modified key: the new key will be the org name as a prefix to the original key.

The client can send the same key, but the Apigee Proxy will verify different keys when running in different organizations.

This might be preferable if changing the client is difficult.