-
Notifications
You must be signed in to change notification settings - Fork 609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Response code 403 (Forbidden) #79
Comments
I changed the line 35 to |
@snowcxt - you're right, that change worked for me as well. Do you know why this fixes the issue? |
I was also getting 403 but for another reason. The url above also has incorrect token: Now the most interesting part. So for |
So, what's the best practice? Will somebody fix this bug? |
I forked google-translate-api and google-translate-token and made it work. You can try by installing: npm i vitalets/google-translate-api UPDATE: npm i @vitalets/google-translate-api See also #79 (comment) |
Worked! |
Could you publish it to npm? @vitalets |
I can make a scoped package, but frankly speaking I'm not a fan of many similar packages in npm. Hi @matheuss, could you kindly have a look on matheuss/google-translate-token#12 and merge it? As it blocks the functionality of both packages. |
I have the same issue, using @snowcxt's solution worked for me. |
So, we don't need the google-translate-token at all? |
Ah God, finally worked! 🤦♂️ |
This is the solution to described problem. Hooray this guy @snowcxt . |
Sources package from vitalets/google-translate-api as described in issue matheuss/google-translate-api#79
Thanks a lot. You saved me. Just not sure how long will this trick work... |
unfortunately, still not work... |
@vitalets your solution is no longer working for me. I forked google-translate-api as well and edited index.js line 35 as suggested, from |
@snowcxt thanks. Changing |
@vitalets i rewrited your token repo in typescript and only replaced |
@P0oOOOo0YA I will re-check. Thanks! |
I've published to npm working scoped package @vitalets/google-translate-api: npm install @vitalets/google-translate-api After install don't forget to use scope in
Also I've added const translate = require('@vitalets/google-translate-api');
translate('Ik spreek Engels', { client: 'gtx', to: 'en' })
.then(res => console.log(res.text)); // => "I speak English" |
Also dont forget this |
amazing ~ What did you do? |
well good,it work well. |
Getting |
Use 'gtx' instead of 't' as ``client`` parameter. (see matheuss/google-translate-api#79 )
gtx no longer functions correctly. After looking at it it seems to be a way for Google Translate Plugin to receive translations without creating a token. Thus it was never meant to be used for many translations. Vitalets as well as matheuss's forks are creating incorrect tokens which is seriously affecting functionality. Could a team be brought together to fix such errors who know how to work with this? I would be of limited help but I do want to help, this would be a huge help.
|
I've released @vitalets/google-translate-api v5.0.0 that fixes the problem. |
line 35 in which file? |
I recently began receiving 403 errors when using
google-translate-api
. Digging in to the source a bit, this is the error that is being thrown:Based on this comment, it seems that Google may have added in some rate limiting that may affect this module. Can you verify if this is the root cause?
The text was updated successfully, but these errors were encountered: