Magento url shortener and Google contacts problem


  • Your avatar
    seyi    
     a year ago
    0

    Hi

    Done that, now I don't have an error anymore when trying to upload from Google Contacts, but:
    - It doesn't seem to do anything when the email contacts are supposedly uploaded
    - I still have a "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup" for google URL shortener

    In my Google API Console, I did the following:
    - set up a server key
    - Renew the key after creating it
    - Setup in AwoRewards backend in Magento

    For Oauth
    - setup an oauth key
    - In authorized javascript origin: https://www.aupasdecourses.com (which is my website)
    - In Authorized redirect URI: https://www.aupasdecourses.com/batignolles/aworewards/invitation/socialmailconfirmoauth2/getter/google/
    - setup the key and secret in AwoRewards Backend

    I was careful with the https://

    Can you give me any hint on why it may not work properly ?

    Thanks

    Pierre
  • Your avatar
    seyi    
     a year ago
    0

    Hello,

    Did not realize you were on magento. That is not updated yet, but for that you can do this.

    In www/app/code/community/AwoDev/AwoRewards/Helper/Oauth/Google.php, around line 102 is this:
    <?php
            $response 
    $this->do_post($this->shortURL$query_parameter_string443,array('Content-type:application/json'));
    ?>


    Please update it to
    <?php
            $response 
    $this->do_post($this->shortURL.'?key='.Mage::getStoreConfig('awodev_aworewards/external_api/social_google_apikey'), $query_parameter_string443,array('Content-type:application/json'));
    ?>


    That should fix the problem with google url.

    For google contacts, if your website is this:
    https://www.aupasdecourses.com 


    Shouldnt the url redirect be this:
    https://www.aupasdecourses.com/aworewards/invitation/socialmailconfirmoauth2/getter/google/


    without batignolles?

  • Your avatar
    seyi    
     a year ago
    0

    For google contacts, when you say nothing happens, do you mean you are redirected to google, enter your credentials, come back to the site with no error messages and no contacts downloaded?

    Also what is the url you come back to on the site?
  • Default avatar
    pierre1    
     a year ago
    0

    Sorry I should have been more explicit about Magento. Your fix work perfectly, Thanks a ton!!!

    About the address, I have three stores under the same website, hence the batignolles. I put the url with and without the "batignolles" and still the same thing. When I ask to upload email from Google Mail Contacts, I'm redirected to the autorize page, I click Authorize and I'm redirect to the Invitation Page with the "Email uploaded" message on top, but I don't have any email under the email input fields ...

    The url I come back to is https://www.aupasdecourses.com/batignolles/aworewards/invitation/
  • Your avatar
    seyi    
     a year ago
    0

    You are welcome.

    Ok, I see now. It might be a permissions issue. In google console, go to api & auth -> api's and click on 'Contacts API'. Is this enabled?
  • Default avatar
    pierre1    
     a year ago
    0

    It was not, now the Google Contacts CardDAV API and Contacts API are enabled, but still doesn't seem to do much. I still only got the "Email uploaded message" but nothing else

    EDIT

    I think there is some delay between activation and proper use. Now it works, but the email list is a bit overwhelming. Gonna look into the code to do something a little more appealing.

    Thanks by the way for your great support