Okay. Tested with 8243 port. I get 403 Error code response.
Please see the screenshot attached. Regards Shib On Sat, Jun 9, 2018 at 2:15 PM, Harsha Kumara <[email protected]> wrote: > > > On Sat, Jun 9, 2018 at 1:48 PM shibsankar <[email protected]> wrote: > >> Okay. I did a testing using that in Postman. >> >> I got a Management console response from Gateway. >> >> I did not receive API response. >> >> Please see the screenshot attached. >> > You have to use port 8243 instead of 9443. Deployed APIs are exposed via > 8243 - HTTPs and 8280 HTTP ports respectively. > >> >> >> Regards >> Shib >> >> >> >> On Sat, Jun 9, 2018 at 1:29 PM, Harsha Kumara <[email protected]> wrote: >> >>> Key = Authorization >>> Value = Bearer <your-token> >>> >>> >>> On Sat, Jun 9, 2018 at 1:25 PM shibsankar <[email protected]> wrote: >>> >>>> I may not be using swagger console at all to invoke API Gateway service >>>> finally. Practically in real application, I'll be using Angular JS >>>> front-end deployed in a http server which will do the invocation to that >>>> *publicly exposed >>>> gateway URL*. >>>> >>>> >>>> Anyway, forget swagger console now. Let me use *Postman* to test this >>>> publicly exposed >>>> gateway URL. Whats the header *key* to use for Authorization token? >>>> >>>> Screenshot attached. >>>> >>>> Regards >>>> Shib >>>> >>>> >>>> On Sat, Jun 9, 2018 at 12:56 PM, Harsha Kumara <[email protected]> >>>> wrote: >>>> >>>>> Hi shibshankar, >>>>> >>>>> The IP that used in the swagger console can be edited from >>>>> api-manager.xml. Please change the URLs highlighted in red. >>>>> >>>>> <Environments> >>>>> <!-- Environments can be of different types. Allowed >>>>> values are 'hybrid', 'production' and 'sandbox'. >>>>> An API deployed on a 'production' type gateway will >>>>> only support production keys >>>>> An API deployed on a 'sandbox' type gateway will only >>>>> support sandbox keys >>>>> An API deployed on a 'hybrid' type gateway will >>>>> support both production and sandbox keys. --> >>>>> <!-- api-console element specifies whether the environment >>>>> should be listed in API Console or not --> >>>>> <Environment type="hybrid" api-console="true"> >>>>> <Name>Production and Sandbox</Name> >>>>> <Description>This is a hybrid gateway that handles >>>>> both production and sandbox token traffic.</Description> >>>>> <!-- Server URL of the API gateway --> >>>>> <ServerURL>https://localhost:$ >>>>> {mgt.transport.https.port}${carbon.context}services/</ServerURL> >>>>> <!-- Admin username for the API gateway. --> >>>>> <Username>${admin.username}</Username> >>>>> <!-- Admin password for the API gateway.--> >>>>> <Password>${admin.password}</Password> >>>>> <!-- Endpoint URLs for the APIs hosted in this API >>>>> gateway.--> >>>>> <GatewayEndpoint>http://${carbon.local.ip}:${http.nio. >>>>> port},https://${carbon.local.ip}:${https.nio.port}</GatewayEndpoint> >>>>> </Environment> >>>>> >>>>> Also if you select HTTP only, you won't be able to invoke it through >>>>> the sagger console as you are browsing the web console using https. The >>>>> browser won't allow you to invoke HTTP from https loaded console. You will >>>>> see this because swagger console will use your browser URL in absence of >>>>> HTTPs expose endpoint. >>>>> >>>>> On Sat, Jun 9, 2018 at 12:49 PM shibsankar <[email protected]> wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> When I publish my API through *WSO2 Publishing > New API Design > >>>>>> Manage > Configuration > Transport*: *HTTPS , HTTP* (*both selected*) >>>>>> and do the API Console testing from WSO2 store , I see request goes >>>>>> through >>>>>> WSO2 server *private IP **address* and I get response from >>>>>> backend API. (screenshot attached). This works okay. >>>>>> >>>>>> >>>>>> However, >>>>>> >>>>>> When I publish my API through *WSO2 Publishing > New API Design >>>>>> > Manage > Configuration > Transport*: * HTTP* (only http selected) >>>>>> and do the API Console testing from WSO2 store, I see request goes >>>>>> through >>>>>> WSO2 server's *public IP **address* and in this case I *don't* receive >>>>>> valid response from backend API. (screenshot attached) >>>>>> >>>>>> why is this ? What to fix so that I can get API response also >>>>>> through WSO2 server public IP address? >>>>>> >>>>>> Regards >>>>>> Shib >>>>>> >>>>>> >>>>> >>>>> -- >>>>> Harsha Kumara >>>>> Associate Technical Lead, WSO2 Inc. >>>>> Mobile: +94775505618 >>>>> Blog:harshcreationz.blogspot.com >>>>> >>>> >>>> >>> >>> -- >>> Harsha Kumara >>> Associate Technical Lead, WSO2 Inc. >>> Mobile: +94775505618 >>> Blog:harshcreationz.blogspot.com >>> >> >> > > -- > Harsha Kumara > Associate Technical Lead, WSO2 Inc. > Mobile: +94775505618 > Blog:harshcreationz.blogspot.com >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
