1 Reply Latest reply on Dec 1, 2017 4:58 PM by danmi RSS
    danmi Explorer

    Google Sheet API (GetJSON SSLHandshakeException)

    Hi:

     

    Looking for tips on how to configure Resources["ContentLoaderFunctions"].GetJSON(params) to retrieve data from google sheet API.

     

    If I use a service like below, the service throws a "Wrapped javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Cause: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target" error.

     

    Service Javascript...

     

    var params = { proxyScheme: undefined /* STRING */, headers: undefined /* JSON */,

                        ignoreSSLErrors: true /* BOOLEAN */,

                        useNTLM: undefined /* BOOLEAN */,workstation: undefined /* STRING */,useProxy: undefined /* BOOLEAN */,withCookies: undefined /* BOOLEAN */,proxyHost: undefined /* STRING */,

    url: "https://sheets.googleapis.com/v4/spreadsheets/{sheet}/values/A1%3AZ999?key={key}" /* STRING */,

        timeout: undefined /* NUMBER */,proxyPort: undefined /* INTEGER */,password: undefined /* STRING */,domain: undefined /* STRING */,username: undefined /* STRING */

    };

    var result = Resources["ContentLoaderFunctions"].GetJSON(params);



    Using a URL of form shown in params above in a unauthenticated web browser, the google API return JSON like the below.

     

    JSON Example

     

        {  "range": "Sheet1!A1:Z997",

                "majorDimension": "ROWS",

                "values": [ [ "a", "b", "c"], ["1", "2", "3"]] }.

     

    Any suggestions on resolving the handshake issue? 

     

    Thanks,

    Dan