Socket
Book a DemoInstallSign in
Socket

google-translate-token-plus

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-translate-token-plus

A package that generates the necessary token to use the Google Translate API for free ,supprting CHINA country

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

google-translate-token-plus Build Status XO code style Known Vulnerabilities

A package that generates the necessary token to use the Google Translate API for free :dollar::no_entry_sign:

Why

translate.google.com uses a token to authorize the requests. If you are not Google, you do not have this token and will have to pay $20 per 1 million characters of text. 457 This package is the result of reverse engineering on the obfuscated and minified code used by Google to generate such token.

How it works

The token is based on a seed which is updated once per hour and on the text that will be translated. Both are combined – by some strange math – in order to generate a final token (e.g. 820594.703830) which is used by the API to validade the request.

Install

npm install --save google-translate-token-plus

Usage

// here  net is not required, can be 'cn', 'com', default is 'com', but 'cn' would be friendly to CHINA
const net = 'cn';
const token = require('google-translate-token-plus')(net);

token.get('Hello').then(console.log);
//=> { name: 'tk', value: '159402.284291' }
  • google-translate-api-plus – A free and unlimited API for Google Translate :dollar::no_entry_sign:

Keywords

translate

FAQs

Package last updated on 10 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.