Forum Discussion

SnapWizard's avatar
SnapWizard
New Contributor III
5 years ago
Solved

Get Token API Post method Failing

I am have a snap that makes a POST API call to get token an a 2nd snap that uses the token to make another api call to get data. When I execute the pipeline there are no visible errors untill I look at the Pipeline statistics where an error is displayed as follows:com.snaplogic.snap.api.SnapDataException: Failed to execute HTTP request. Reason: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target
Resolution: Please check the Snap properties.

  • My problem was solved by selecting the “Trust all certificates” checkbox

10 Replies

  • SnapWizard's avatar
    SnapWizard
    New Contributor III

    My problem was solved by selecting the “Trust all certificates” checkbox

  • This seems like a certificate issue. I recently had a similar issue with a proxy server which
    had a self-signed certificate. I had to import its cert into my Java truststore ($JAVA_HOME/lib/security/cacerts) using keytool. Can you share a bit more information.

    • SnapWizard's avatar
      SnapWizard
      New Contributor III

      We are using snaplogic Cloudplex to make the calls to customer api. So do we need to verify the certificate on the Cloudplex server?

      Eva Rodriguez

      • mbowen's avatar
        mbowen
        Employee

        Can you tell me the snap pack that is raising this exception? I assume the customer API is an SSL endpoint. Maybe endpoint certificate isn’t trusted, and needs to be added to cloudplex’s trust store – not sure. I was working with groundplex, and need to understand the demarcation of responsibility with our cloudplexes. I suppose I should know, but don’t, so will find out 🙂

  • dmiller's avatar
    dmiller
    Former Employee

    Any HTTP header key-value pairs not defined in the REST Post that should be?

    • SnapWizard's avatar
      SnapWizard
      New Contributor III

      @dmiller No all header key-value pairs are defined. We have other pipelines set up the same way that is succeeding. The difference between them and this one is the base url. I am able to access the endpoint using other API Testing tools.