Cannot configure custom GET request with Authorization Header in v2.4.1 #509
Unanswered
nguyenvuson279
asked this question in
Q&A
Replies: 1 comment
-
|
The URL in your code doesn’t seem to be a valid API endpoint because it’s not returning JSON. Do you have any documentation or sample responses from the service you’re using? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am trying to configure a custom API for Vietphrase.info but I always get the error "Expression to parse response is required", even though the JSON seems correct. I am using plugin version 2.4.1.
My API requires a GET request with a Bearer Token in the Authorization header. Here is the JSON configuration I tried, which causes the error:
{ "name": "Vietphrase API (Final)", "languages": { "source": { "Chinese": "zh" }, "target": { "Vietnamese": "vi" } }, "request": { "url": "https://api.vietphrase.info/translate/vp?source_text=<text>", "method": "GET", "headers": { "Authorization": "Bearer YOUR_TOKEN_HERE" } }, "parser": "$.data" }Beta Was this translation helpful? Give feedback.
All reactions