hubot-google-translate icon indicating copy to clipboard operation
hubot-google-translate copied to clipboard

Google API & Charge

Open rihlsul opened this issue 8 years ago • 2 comments

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

rihlsul avatar Jan 26 '16 15:01 rihlsul

Updated the API in #9 and also create another translator with Microsoft Translator

  • https://github.com/kkpoon/hubot-microsoft-translator

kkpoon avatar Jan 28 '16 10:01 kkpoon

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>

rihlsul avatar Mar 04 '16 09:03 rihlsul