API keys in different environments

I have 2 environments dev and test

I have one proxy and product deployed for both environments. I have separate target servers for dev and test env. This proxy has an API key policy.

Now, I am wondering if it is possible to make different api keys work in different environments for same proxy

Thank you
Nikhil C R

0 5 1,079
5 REPLIES 5

@Nikhil Chagatoor Rudramuni Gowda

Dev apps are configured at org level and not at an environment level. If you have both dev and test environments configured as part of the same ORG, there is no in-built way of configuring different api keys per environment.

Some options would be:

1. Create two different dev apps with same product subscriptions, use the keys for each app to access separate environments.

ITs not an elegant solution, it still doesnt prevent accessing the proxies on the two environments with the keys used interchangeably

2. Host the environments in separate ORGs - this requires added maintenance tasks for the new ORG. But ensures that the key cannot be used across environments.

Thank you for the note @Nagashree B


@Nikhil Chagatoor Rudramuni Gowda

have you got your question answered (below) ?

Another option you can create two different products with same set of proxies (or different proxies) and enable environment for these products. Then create two different dev apps for these products. For example, assume there are two environments dev and uat.

1. Create DevProduct & enable environment dev

2. Create UatProduct & enable environment uat

Now you can create following apps

1. MyDevApp -> Associate DevProduct to this app

2. MyUatApp -> Associate UatProduct to this app

This will prevent cross environment access.

Thank you for the suggestion. While this is certainly an option, I am afraid if this will create approval bottlenecks