3 Replies Latest reply: Nov 5, 2013 1:13 AM by Habib RSS

    Acquiring an Access Token via coding (in Salesforce) - not web logon screen

    ittichai

      I'm setting up APEX REST security by following the instructions from http://www.oracle.com/technetwork/developer-tools/apex-listener/documentation/listener-dev-guide-1979546.html#acquiring_an_access_token  Everything works great according to document. I can acquire a token, then passing it in the header to get needed data from REST service.

       

      Consumer acquires an token by going on web browser to https://server:port/apex/resteasy/oauth2/auth?response_type=token&client_id=CLIENT_IDENTIFIER&state=STATE   It will be redirected to https://servert:port/apex/restwasy/sign-on?r=oa  asking for username and password on browser. Once entering them correctly, it will be directed to Redirect URI defined in the OAuth2 client with the token in the URL.

       

      My question is that is it possible to do token acquiring by coding (like in Salesforce) without going to web browser? We've tried doing that, it will stop due to redirect to sign-on.

       

      Thanks in advance.

       

      Ittichai