diff --git a/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/Endpoints.jsx b/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/Endpoints.jsx index 558be616c3d..46b3c04ddf4 100644 --- a/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/Endpoints.jsx +++ b/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/Endpoints.jsx @@ -471,7 +471,7 @@ function Endpoints(props) { } } } else if (production.type === 'apikey') { - if ((production.apiKeyValue === null || production.apiKeyValue === '') && + if ((production.apiKeyValue === null) && endpointConfig.production_endpoints) { return { isValid: false, @@ -526,7 +526,7 @@ function Endpoints(props) { } } } else if (sandbox.type === 'apikey') { - if ((sandbox.apiKeyValue === null || sandbox.apiKeyValue === '') && + if ((sandbox.apiKeyValue === null) && endpointConfig.sandbox_endpoints) { return { isValid: false,