I’m in love…
January 26th, 2010
So with the introduction of the HTML5 based Google Voice website comes some other good stuff that you won’t see. JSON based data feeds. With these data feeds, no longer will I or other developers need to sift through mounds of HTML code to get to the core of the data – Google provides it all in one nice chunk.
Without testing them, here goes:
- Voicemail list: https://www.google.com/voice/m/x?m=list&l=voicemail&o=0&lm=10 – Looks like o is the start position and lm is the number of results? Or start and end? Requires POST pair of “gvx” and the value is unknown…
- SMS list: https://www.google.com/voice/m/x?m=list&l=sms&o=0&lm=10 – see above
- Inbox list: https://www.google.com/voice/m/x?m=list&l=inbox&o=0&lm=10 – see above
- All History list: https://www.google.com/voice/m/x?m=list&l=all&o=0&lm=10 – see above
- Placed Call list: https://www.google.com/voice/m/x?m=list&l=placed&o=0&lm=10 – see above
- Received Call list: https://www.google.com/voice/m/x?m=list&l=received&o=0&lm=10 – see above
- Missed Call list: https://www.google.com/voice/m/x?m=list&l=missed&o=0&lm=10 – see above
- Recorded Call list: https://www.google.com/voice/m/x?m=list&l=recorded&o=0&lm=10 – see above
- Make a Call: https://www.google.com/voice/m/x?m=call&n=<Number to call>&f=<Call forwarding number to call FROM> – requires that “gvx” post pair as well.
- Send SMS: https://www.google.com/voice/m/x?m=sms&n=<Number to send SMS to>&txt=<the text> – requires that “gvx” post pair as well.
So that’s the core of the calls. I don’t have the time to figure out the “gvx” pair, although I suspect it’s a cookie value or something similar to the “_rnse” value we all use now.
Oh, and that new “make call” API is bad to the ass! Screw the web based call back…
Enjoy.
I see 2.1 in the myst correct or what is the actual version number GV Mobile+ is on
Good Lord; thank you Google, and thank you Sean. Great job on this new version.
Well, Id stick with the web based (in Canada), dont want to suffer long distance. Sean thanks to your GV APP, for now this HTML5 gets a BIG ignore from me!!!
Wow… that “make call” API really is sweet. I take it you’ll be incorporating that into the next version of GV Mobile +? Is there any way you can avoid the popup “Call +1XXXXXXX” and just have it make the call?
Even if not, that’s much cooler than the call back scenario…
And yes, the “gvx” pair is stored in a cookie.
@Anonymous Ahh – I better make that an option then. It does call a US based bridging number…
How is ‘call the +1 number’, better than the call back? For those who have regional plans, they I would assume prefer the call back, than a call out.
Agree.. Having to click on “call the number” button isn’t much better than having to accept an inbound call. Ideally, Sean will figure out a way to just dial through, without any further interactions.. like you can already do with Android-based GV app.
JSON! YOU JUST MADE MY DAY!
Hopefully that also means GVMobile just got a mega speed boost too, yeah?
@hitekalex
No, callback really sucks. You have to sit there and wait for it, then it either rings loudly or vibrates while you furiously tap “accept” to take a call from what appears to be your own phone number, making your inbound call list look totally confusing, etc.
This will be a vast improvement once it’s implemented in GV Mobile+.
@JMR Actually, I just realized that this method also crowds up your outgoing call logs with strange forwarding numbers. I wish there was a way to completely replace phone.app with GV Mobile+, but it would probably be more of a hassle than it’s worth to code this.
I have a question surrounding the new API, “make call”… Will this be the only method of initiating a call? The reason why I ask is I like to use Skype for making calls over the 3G network. I have it running in the background then when the google voice call back comes in I answer.
The new HTML5 based Google Voice website prompts you to dial, so does that mean that it will use the default dialer to initiate the call? It would be awesome if I could place the call from GV Mobile and have it open up Skype to dial.
With any future updates to GV Mobile, will the option of getting a call back from GV still be available?
@JCC
Nah, I’ll offer options..
@JMR “this method also crowds up your outgoing call logs with strange forwarding numbers”
Yes the iPhone dialer log gets cluttered with GV forwarding numbers.. The GV history shows the “real” outgoing numbers. I think the trick here is to “hide” iPhone dialer completely and just interact with GVM+ for everything.
Sean thanks for the reply! And thank you for the great post on how to use Prowl to get push notifications for GV Mobile.
One thing I like about Prowl is it can launch another iphone app… I am assuming any app can be programmed to do this?? Would you consider adding the option to launch Skype (or any other dialer) after clicking dial from your app? I am not sure what if any info you could pass along to the opening app, i.e. the phone number to dial, tab to open etc… But this feature would be awesome addition to an already great program.
I love the call back feature.
So how would one use these URLS? I was assuming that I’d be able to copy and paste something like this into my address bar to get it to work but they aren’t working. This was going to be my first step to kind of see how they work before even trying to incorporate them into any kind of native app.
Do they not work until you have set up the cookie? If so is there another URL for logging in?
Since I’m in Canada, and was lucky enough to have signed up for Grand Central before it was purchased by Google, I still have GV forwarding to my Canadian #. And because I have free incoming calls on my cell plan, I actually prefer that it calls me. Sean, if you change the behaviour of GV Mobile to reflect that of the GV web app, would there be a way to toggle back to the existing implementation? Me hopes so… Great work with GV Mobile so far btw!
As I glance at the code myself, the Javascript (is so crazy obfuscated) but the gvx seems to be the hash of some other values (it might be a pair of hash values).
Might have to run the javascript through a debugger to follow it.
Note: I got the code to work in Firefox using a plugin to change the user-agent to Iphone. While the display is all wrong, the site seems to function completely. The outdial causes the browser to surf to a “tel:” URL (hence the need to “confirm” the outdial on the iphone, which I doubt your app can “disable”).
I can’t wait for the next update!
Ok, the gvx value is basically a cookie that is sent when you request the page https://www.google.com/voice/m
Note: the User Agent sent seems to be important. If you don’t use the right UserAgent (probably iphone and WebOs browsers?) you won’t get the gvx cookie back.
So if you hit https://www.google.com/voice/m and get a 302, that means your aren’t logged in or authorized .(lack of a good set of cookies)
You get redirected to:
https://www.google.com/accounts/ServiceLogin?nui=5&service=grandcentral<mpl=mobile&btmpl=mobile&passive=true&continue=https%3A%2F%2Fwww.google.com%2Fvoice%2Fm
If you then have to post the google username and password, and it will start a series of 2 different 302 redirects that set/check cookies until you finally get redirected BACK to https://www.google.com/voice/m but this time with an ?auth parameter.
Now you should get back the normal iphone Javascript page, with a set cookie that contains the gvx value.
Note: the gvx cookie always seems to be expire in about a day or less.
It basically looks like an Ajax like strategy to allow you to make phone calls via cached version of the voice/m page (much better for mobile!), but always still send the latest “cookie” for extra security.
if the gvx is old it seems to give you a JSON response with an auth failure.
Love your app best $2 I ever spent plus prowl for SMS push. Can u add a quick compose for SMS messages like biteSMS or irealsms so I don’t have to load the app when a get a text, that would be awesome but I bet it would be a lot of behind the scenes work?
Any chance you could write up a demo/example of how you’d use the JSON feeds? (I’m assuming you’ve figured out how to use them.) I’m really curious about how this stuff works, but I have almost no idea on where to start with something like this.
So, anyway you can update us with what you are working on?
Thanks, Sean, for creating and continuing to develop this great app.
The call back feature is quite valuable if one is on AT&T and uses their A-List option. Then, the call backs from the Google Voice number are treated as free minutes. My wife and I have saved so much money, especially for calls into Canada from the USA.
Still waiting on an update to see what changes you are doing, if any.
Yup, if you could give us an idea of the new changes that would great. Need to know if I should delete your app and go with google voice website or not. Thanks
I love the callback as well! Especially since I have my Google Voice number on my ATT A-List (Favs). Great for additional privacy, too, as all incoming calls (and callbacks) appear with my Google Voice number as the Caller ID on my iPhone.
I working on some stuff – I hate the new gvx cookie as it expires way too soon. It’s actually a pain in my ass.
its funny that i found this article… i was trying to find out how the android app makes calls so i could document the protocol for inclusion in GV mobile… but I just got the iPhone 4, so I have to use the HTML5 webapp… just noticed the “CALL” feature… and used the Dev Tools to find out the same info as you just posted here… i actually came here looking for the gvx variables…
any chance you are going to update the app with this protocal and fast app switching for os 4?