How to tell which org the developer portal is associated with?

Not applicable

We have two developer portals with isolated orgs, internal and external.

We want to prevent users from putting internal APIs in the external site and vice versa.

However, to detect that, we need to know which org the site is using.

Can you provide information on how to detect which org the site is using?

Client side: Javascript

Server side: php variables or function calls

Thank you for your time,

Mitchel

Solved Solved
1 1 196
1 ACCEPTED SOLUTION

@Mitchel Skees , Great Questions,

You can retrieve org information using below php function. For more details refer devconnect.module in profiles/apigee/modules/customer/devconnect folder files.

$org_settings = devconnect_get_org_settings();
$org_settings['org']; // Gives org name

Regarding Javascript,

You can set the variable in your custom module and access same from javascript. See example here. Hope it helps. Keep us posted if any.

View solution in original post

1 REPLY 1

@Mitchel Skees , Great Questions,

You can retrieve org information using below php function. For more details refer devconnect.module in profiles/apigee/modules/customer/devconnect folder files.

$org_settings = devconnect_get_org_settings();
$org_settings['org']; // Gives org name

Regarding Javascript,

You can set the variable in your custom module and access same from javascript. See example here. Hope it helps. Keep us posted if any.