Navigation

    APPDRAG Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular

    REMINDER

    Please be respectful of all AppDragers! Keep it really civil so that we can make the AppDrag community of builders as embracing, positive and inspiring as possible.

    API key

    General Discussion
    2
    6
    237
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dick Honing
      Dick Honing last edited by

      Hi there, does anybody have an example of how to setup the API function API key? Whatever I'm trying in Postman unfortunately does not work ... Screenshot 2020-07-10 at 22.55.12.png

      1 Reply Last reply Reply Quote 0
      • Joseph Benguira
        Joseph Benguira last edited by Joseph Benguira

        Hey Dick,

        you must pass the "APIKey" in the Body as x-www-form-urlencoded like this in postman

        23f33eea-be89-41a0-98df-9df0f47a6321-image.png

        Please keep in mind that this APIKey protection is made to be used from other backends, and never from frontend code, this would expose your API Key publicly!

        1 Reply Last reply Reply Quote 0
        • Dick Honing
          Dick Honing last edited by

          Hi Joseph, what if I want to send it as application/json? I've tried putting the code that's in the api test routine, but that does not work.

          {
              "name": "test",
              "idfm": "1001",
              "APIKey": "29ec641e-etc."
          }
          
          1 Reply Last reply Reply Quote 0
          • Joseph Benguira
            Joseph Benguira last edited by

            It won't work as it's expecting Body as x-www-form-urlencoded

            1 Reply Last reply Reply Quote 0
            • Dick Honing
              Dick Honing last edited by

              Hi Joseph, thanks! ... and uh ... if I understand correctly; APIKey will not (yet?) work with application/json?

              1 Reply Last reply Reply Quote 0
              • Joseph Benguira
                Joseph Benguira last edited by

                That's exactly what I said. you must pass the API Key as x-www-form-urlencoded body
                We might later accept "application/json" but for now we don't

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post