Open rihlsul opened 8 years ago
Updated the API in #9 and also create another translator with Microsoft Translator
I've grabbed the code in #9, signed up for a Google API, got my key, verified it worked in Chrome via simple URL testing.
But, my Hubot is throwing: Message: The Web Token must have a signature at the end. The incoming token did not have a signature at the end of the token.
The only things I'm finding that might suggest a solution are to switch my Node.js query engine entirely.
Edit: For clarity, I did set the API_KEY environmental value correctly. I tweaked the robot.emit on errors to include what it was sending, and it spat out the right key. It's like the .get() isn't sending the query options:
<html><body><h1>Argument Exception</h1><p>Method: Translate()</p><p>Parameter: </p><p>Message: The Web Token must have a signature at the end. The incoming token did not have a signature at the end of the token.</p><code></code><p>message id=5005.V2_Rest.Translate.B94F853</p></body></html>
Since Google API charges, the question is: Clearly this script is going to have limited success.
Can it be configured to use the Paid Google Translate API?
Ref: https://cloud.google.com/translate/v2/pricing