Announcement

Collapse
No announcement yet.

Including an API Key in an HTTP Header

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • robinemcd
    replied
    Thanks Bill!!!

    Leave a comment:


  • wmgilligan
    replied
    Yes - that should work as well. Just switch out the method to POST. If sending some JSON, switch it to RAW.

    Leave a comment:


  • robinemcd
    replied
    Thanks Bill. I should have also said that they require using Post and not Get. Would it work the same?

    Leave a comment:


  • wmgilligan
    replied
    Something like this should work
    Code:
     
    <MvASSIGN NAME="l.crlf" VALUE="{ asciichar(13) $ asciichar(10) }">
    <MvCall action="{ 'https://www.checkthis.com/letmein' }" method="GET" CONTENT-TYPE="application/json" HEADERS="{ 'Authorization: DeepL-Auth-Key  ' $ YOURAPIKEY $ l.crlf }" fields="" FLAGS="noparse">
        <MvAssign name="l.results" value="{ callvalue }">
    </MvCall>

    Leave a comment:


  • robinemcd
    started a topic Including an API Key in an HTTP Header

    Including an API Key in an HTTP Header

    In a non-merchant application, we use a translation tool, DeepL. They have deprecated the ability to include our API key in an auth_key query parameter. They say:

    Going forward, you will need to authorize any API request, to any endpoint, by including your API key in an HTTP header named Authorization, like this:

    Authorization: DeepL-Auth-Key [yourAuthKey]
    We are unclear if this is something that we can do with our MivaScript application. Any thoughts on how to do this would be very helpful.
Working...
X