Giter Club home page Giter Club logo

voice.js's Introduction

voice.js

NOTICE: This project is no longer maintained.

What is it?

It's the Google Voice library for node.js.

It builds on and improves node-google-voice, the original node.js Google Voice library.

It currently allows you to:

  • place calls
  • send texts
  • access and manipulate GV conversations
  • access and manipulate GV forwarding phones
  • access and manipulate GV settings
  • access and manipulate GV contacts
  • access and manipulate GV call groups
  • access and manipulate GV greetings
  • access and manipulate GV webcall widgets

Installation

Install via npm:

npm install voice.js

The version on npm may not reflect all the latest changes, especially during times of heavy development. To get the most up-to-date version, download the current master zip file, then run the following code from inside the folder:

npm install

Dependencies

npm should take care of dependencies, but in case it fails to do so, try installing these modules (and their dependencies) independently.

API

The API documentation is in docs/API.md. Also, see the examples for clarifications.

License

MIT License. See LICENSE.

Conclusion

Google does not have an official Google Voice API. Therefore, the nature of the requests and returned data can change without notice. It is unlikely to change often or soon, but I will make all efforts to keep up with the most current implementation. If you have any issues, please give me a shout, and I'll do my best to address them.

voice.js's People

Contributors

amper5and avatar jpdicosola avatar wanderview avatar

Stargazers

 avatar jaemin1508 avatar Saahil avatar 早点 avatar  avatar Brian Turner avatar Israel Gonzalez-Brooks avatar Frank avatar  avatar Lukas avatar  avatar Cesar Perez avatar Rafael Valverde avatar Drake Boley avatar  avatar Outlier avatar Cat  avatar Aaron Robinson avatar zhuqling avatar 131 avatar Kirk Sutton avatar Alexander Lester avatar  avatar  avatar Matin Kaboli avatar  avatar Russell Daly avatar mrlion avatar Alexis Leon avatar Maurice Rabb avatar Trevor McIntire avatar  avatar Ilya avatar Leo avatar Alvar Laigna avatar Daniel Bodnar avatar  avatar Aymeric Beaumet avatar  avatar Valentin Vichnal avatar Kyle Ladd avatar David Li avatar Denys Sedchenko avatar Julien Bouquillon avatar Martin Charles avatar  avatar guodont avatar Darryl D. avatar NoArch avatar Hans Kokx avatar David avatar Edwin Choate avatar Hunter avatar Joe Walsh avatar Stefan Huwiler avatar  avatar Barrett Hafner avatar David Trejo avatar Chase Starr avatar Pablo Papes avatar Dino Chiesa avatar proglo projection luminance technology avatar dz avatar Volodymyr Boldovskyy avatar Ajay Gandhi avatar Kevin Chavez avatar Sandeep Shantharam avatar Geronimo Moralez avatar Eli Mallon avatar Chris Butler avatar Diego Ponce avatar Gavin Engel avatar Michael Mulligan avatar String avatar metame avatar Noah Bass avatar  avatar Geza Kovacs avatar Michael Anthony avatar Jared Flack avatar Johan de Jong avatar  avatar Ian Macalinao avatar David Windham avatar Alberto avatar Edwin Estrada avatar Zetaphor avatar Thomas Foster avatar Jack Guy avatar Ryan Welton avatar Justin Beaudry avatar Ethan Veres avatar machineloop avatar Eli White avatar Zoey Mertes avatar  avatar Boris Joffe avatar  avatar Yue Chen avatar Marwan Hilmi avatar

Watchers

 avatar  avatar tom zhou avatar Christian Hochfilzer avatar Jim Schmehil avatar Sebastien Vayrette-Gavard avatar  avatar James Cloos avatar Stéphane Adam Garnier avatar Michael Anthony avatar Gabe07 avatar Kenshin avatar Matthew Sebek avatar  avatar  avatar Dan Whitacre avatar proglo projection luminance technology avatar

voice.js's Issues

Easiest way to check for valid login

What's the easiest way to check if

var client = new voicejs.Client({
email: email,
password: password
});

Was able to login successfully? I want to be able to check if the login was successful before doing other things and the only way this seems to be possible is by calling one of the voice.js functions and then reading the error it returns(if it does). Any help is greatly appreciated!

when running tokens.js it throws an error see below

node .\tokens.js "[email protected]" "password"
.rnr error: { [GoogleVoiceError: LOGIN_ERROR]
code: 1,
message: 'LOGIN_ERROR',
details:
{ [Error: Login failed]
data: 'https://developers.google.com/accounts/docs/AuthForInstalledApps\n',
response:
{ _readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_maxListeners: 10,
socket: [Object],
connection: [Object],
httpVersion: '1.1',
complete: true,
headers: [Object],
trailers: {},
_pendings: [],
_pendingIndex: 0,
url: '',
method: null,
statusCode: 404,
client: [Object],
_consuming: true,
_dumped: false,
httpVersionMajor: 1,
httpVersionMinor: 1,
upgrade: false,
req: [Object],
pipe: [Function],
addListener: [Function: addListener],
on: [Function: addListener],
pause: [Function],
resume: [Function],
read: [Function] } } }
.gvx error: { [GoogleVoiceError: LOGIN_ERROR]
code: 1,
message: 'LOGIN_ERROR',
details:
{ [Error: Login failed]
data: 'https://developers.google.com/accounts/docs/AuthForInstalledApps\n',
response:
{ _readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_maxListeners: 10,
socket: [Object],
connection: [Object],
httpVersion: '1.1',
complete: true,
headers: [Object],
trailers: {},
_pendings: [],
_pendingIndex: 0,
url: '',
method: null,
statusCode: 404,
client: [Object],
_consuming: true,
_dumped: false,
httpVersionMajor: 1,
httpVersionMinor: 1,
upgrade: false,
req: [Object],
pipe: [Function],
addListener: [Function: addListener],
on: [Function: addListener],
pause: [Function],
resume: [Function],
read: [Function] } } }
.auth error: { [GoogleVoiceError: LOGIN_ERROR]
code: 1,
message: 'LOGIN_ERROR',
details:
{ [Error: Login failed]
data: 'https://developers.google.com/accounts/docs/AuthForInstalledApps\n',
response:
{ _readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_maxListeners: 10,
socket: [Object],
connection: [Object],
httpVersion: '1.1',
complete: true,
headers: [Object],
trailers: {},
_pendings: [],
_pendingIndex: 0,
url: '',
method: null,
statusCode: 404,
client: [Object],
_consuming: true,
_dumped: false,
httpVersionMajor: 1,
httpVersionMinor: 1,
upgrade: false,
req: [Object],
pipe: [Function],
addListener: [Function: addListener],
on: [Function: addListener],
pause: [Function],
resume: [Function],
read: [Function] } } }

Is this module currently working?

When I tried to generate token.json with tokens.js, it fails on gvx token generation. The error code I'm getting is 100 and message is 'UNKWOWN_FORMAT'. I'm assuming Google has changed their API since the last update?

Update for altsms method path

In the file lib/voicejs.comm.js, on line 7, the "path" parameter needs to be updated to reflect a change in Google's URL for sending multiple messages simultaneously.

The new path is "/b/1/sms/send/"

Cannot generate Token

Getting the following error when attempting to generate the token.json. The endpoints look like they may have changed.

TypeError: Cannot call method 'filter' of undefined
at getCookie (voice.js:178:21)

Jar comes back but cookies property not there

http://pastebin.com/faN340nc

When running phone.js in the examples it returns all phones as enabled even if all phones are disabled.

Here is the raw console.log output form the phone.js all phone were disabled.

Forwarding phone ids: 2, 5, 6
{ '2':
{ id: 2,
name: 'Sipgate',
phoneNumber: '+9876543210',
type: 1,
verified: true,
policyBitmask: 0,
dEPRECATEDDisabled: false,
telephonyVerified: true,
smsEnabled: false,
incomingAccessNumber: '',
voicemailForwardingVerified: false,
behaviorOnRedirect: 1,
carrier: '',
customOverrideState: 0,
inVerification: false,
recentlyProvisionedOrDeprovisioned: false,
forwardingCountry: 'US',
formattedNumber: '(987) 654-3210',
reverifyNeeded: true,
wd: { allDay: false, times: [] },
we: { allDay: false, times: [] },
scheduleSet: false,
weekdayAllDay: false,
weekdayTimes: [],
weekendAllDay: false,
weekendTimes: [],
redirectToVoicemail: true,
active: true,
displayUnverifyScheduledDateTime: '12/1/12 5:29 PM',
enabledForOthers: true },
'5':
{ id: 5,
name: 'Google Talk',
phoneNumber: '[email protected]',
type: 9,
verified: true,
policyBitmask: 0,
dEPRECATEDDisabled: false,
telephonyVerified: false,
smsEnabled: true,
incomingAccessNumber: '',
voicemailForwardingVerified: false,
behaviorOnRedirect: 0,
carrier: '',
customOverrideState: 0,
inVerification: false,
recentlyProvisionedOrDeprovisioned: false,
forwardingCountry: '',
formattedNumber: '[email protected]',
reverifyNeeded: false,
wd: { allDay: false, times: [] },
we: { allDay: false, times: [] },
scheduleSet: false,
weekdayAllDay: false,
weekdayTimes: [],
weekendAllDay: false,
weekendTimes: [],
redirectToVoicemail: false,
active: true,
displayUnverifyScheduledDateTime: '12/31/69 7:00 PM',
enabledForOthers: true },
'6':
{ id: 6,
name: 'Home Home',
phoneNumber: '+1234567890',
type: 3,
verified: true,
policyBitmask: 0,
dEPRECATEDDisabled: false,
telephonyVerified: true,
smsEnabled: false,
incomingAccessNumber: '',
voicemailForwardingVerified: false,
behaviorOnRedirect: 1,
carrier: '',
customOverrideState: 0,
inVerification: false,
recentlyProvisionedOrDeprovisioned: false,
forwardingCountry: 'US',
formattedNumber: '(123) 456-7890',
reverifyNeeded: true,
wd: { allDay: false, times: [] },
we: { allDay: false, times: [] },
scheduleSet: false,
weekdayAllDay: false,
weekdayTimes: [],
weekendAllDay: false,
weekendTimes: [],
redirectToVoicemail: true,
active: true,
displayUnverifyScheduledDateTime: '12/1/12 5:29 PM',
enabledForOthers: true } }

Forwarding phone details:
2: home +9876543210 enabled verified
5: googletalk [email protected] enabled verified receives SMS
6: work +1234567890 enabled verified

Notification of incoming call or new voicemail

Any idea of how to go about adding functionality to subscribe to events like 'call' or 'new voicemail'?

I can't see a websocket connection, but it looks like there is some kind of iframe communication that push updates the the UI...

sms sending

Hallo

when sms method is used to send sms it does so in first attempt, but in all subsequent call it fails to send it.

Only difference I noticed is data.send_sms_response property of budy gets:
0-> on success and
58 -> on failure

Any idea?

Best regards!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.