Forum Discussion

peter's avatar
peter
New Contributor III
6 years ago
Solved

Convert data from SQL select to JSON

What is the best way to take data from a SQL Select statement and convert to JSON so that it can be used in a API put commend?

5 Replies

  • flavia_sarah's avatar
    flavia_sarah
    New Contributor II

    Thanks @bhupender.singh for your input, which was still helpful to me even after a year. 🙂
    I was facing the same issue in Oauth2 Account, as it wasn’t auto-refreshing the token for me, and I was reluctant on taking the whole REST POST Snap approach.

    In SFDC App, I had only Selected OAuth Scopes as “Full access (full)”, now I tried selecting both:

    1. Full access (full)
    2. Perform requests on your behalf at any time (refresh_token, offline_access)

    and generated the Client ID and Client Secret which I then used in the Snaplogic Oauth2 account. It works for me now! 🙂
    Will keep posted on any other observations. Thanks again!

    • KTsnap's avatar
      KTsnap
      New Contributor III

      Hi, Could you please let us know what have you given in callback url at salesforce end. We are getting the below error while clicking on “authorize” in snaplogic salesforce oauth2 account.

      error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration

      • bojanvelevski's avatar
        bojanvelevski
        Valued Contributor

        HI @KTsnap,

        I believe you need to add the Snaplogic redirect uri:

        https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/rest