-
Notifications
You must be signed in to change notification settings - Fork 108
It works locally and fails remotely #17
Comments
I had this problem today also, except I didn't test locally. If you add Hope this helps! I will be forking this to add my own functions to it, so I might have to add a few lines to handle submitting the recovery email for verification. I'll reply here if I can get the author to merge my updates. |
@lindylex, can you please test my fork before I submit a pull request? Just pass GoogleVoice() your Gmail's recovery email address as a third argument. Let me know how it works for you. |
Danielmarquard, you are awesome. I was dreading the idea of spending hours trying to figure this out. I just do not have enough time. I am not home. I will test this later today. I seriously hope this works. I will give you credit at the url where I created a project using this code. Thanks, Lex |
I added the following to permanently delete a message. I have never requested a merge or submitted my changes before. I will give it a try.
I added the following from above, above this line: " public function dom_dump($obj) {" Use it like this to permanently delete a message. |
I tested it locally and it works fine. My hosting company changed something in their settings disabling my ability to upload to my website. Once I have access I will upload to test. |
Danielmarquard , I receive this error testing it remotely: Fatal error: Uncaught exception 'Exception' with message 'Could not log in to Google Voice with username: [email protected]' in /XXX/XXX/php.mo-de.net/XXX/Google-Voice-PHP-API-master/GoogleVoice.php:88 Stack trace: #0 /XXX/XXXX/php.mo-de.net/XXXX/Google-Voice-PHP-API-master/GoogleVoice.php(223): GoogleVoice->_logIn() #1 /XXXXXXX/php.mo-de.net/XXXX.php(27): GoogleVoice->getUnreadSMS() #2 {main} thrown in /XXXXXX/php.mo-de.net/XXXX/Google-Voice-PHP-API-master/GoogleVoice.php on line 88 |
Hey @lindylex. Sorry for my delay. :) Can you add |
Just a heads up this approach needs to updated as
no longer exists in the page and the form appears to differ as well. |
[ Solution Solved ] The problem: Google does not like less secure applications to have access to your account. When these applications try to login additional verification steps are needed. A way to get pass this is to decrease the level of security by doing the following.
That solved it for me. Thanks for all the help, until next time. [ This is what I created if anyone is interested in playing with it. ] |
hello DanielMarquard, Fatal error: Uncaught exception 'Exception' with message 'Could not parse for GALX token' in /home/anjali09/public_html/sms2/GoogleVoice.php:48 Stack trace: #0 /home/anjali09/public_html/sms2/GoogleVoice.php(110): GoogleVoice->_logIn() #1 /home/anjali09/public_html/sms2/example.php(13): GoogleVoice->callNumber('9530519517', '5558675309', 'mobile') #2 {main} thrown in /home/anjali09/public_html/sms2/GoogleVoice.php on line 48 |
Look at https://github.com/xenth/Google-Voice-PHP-API |
I wrote a script that uses this API set up as a cron job to run once a minute, and while it works for a little while, it seems that after enough login attempts, Google starts throwing captchas in to the mix, which causes trouble logging in. Does anyone have a solution to that, or does change account settings to allow less secure apps fix the problem? |
@DavidBerdik Give this a try: |
@daviddietz-zz I haven't quite figured out what the link does, but I did push the "Continue" button. |
@DavidBerdik 1. Have the email program or service (cron job) that has failed to access your Gmail account ready. 2. Visit the Allow access to your Google account page at Google. 3. Click Continue. 4. Within 10 minutes of clicking "Continue," have the previously blocked email service or program (your cron job) check for new messages. |
@daviddietz-zz Okay thank you. I had to change my script to use a new Google account, and within the first 24 hours of doing so, I had to use this twice, but since then, it appears to be working without any interruptions. |
This is the error I am receiving.
Fatal error: Uncaught exception 'Exception' with message 'Could not log in to Google Voice with username: [email protected]' in /mnt/stor1-wc2-dfw1/416498/627339/php.mo-de.net/web/content/farse/Google-Voice-PHP-API-master/GoogleVoice.php:69 Stack trace: #0 /mnt/stor1-wc2-dfw1/416498/627339/php.mo-de.net/web/content/farse/Google-Voice-PHP-API-master/GoogleVoice.php(204): GoogleVoice->_logIn() #1 /mnt/stor1-wc2-dfw1/416498/627339/php.mo-de.net/XXX/XXX/XXX/XXXX.php(20): GoogleVoice->getUnreadSMS() #2 {main} thrown in /mnt/stor1-wc2-dfw1/416498/627339/php.mo-de.net/XXX/XXXX/XXXXX/Google-Voice-PHP-API-master/GoogleVoice.php on line 69
The text was updated successfully, but these errors were encountered: