Announcement
Collapse
No announcement yet.
Including an API Key in an HTTP Header
Collapse
X
-
Yes - that should work as well. Just switch out the method to POST. If sending some JSON, switch it to RAW.
Leave a comment:
-
Thanks Bill. I should have also said that they require using Post and not Get. Would it work the same?
Leave a comment:
-
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:
-
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:
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.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]Tags: None
Leave a comment: