Google API interface has changed substantially - battling to get Appts GCAL setup done

hi wpmudev!
i'm battling to set up the calendar api for appts+,
the google interface has changed substantially from when the information was written on how to get it done?
could you please, please revisit - and i've enabled remote support on the dashboard if anybody wants to come see my misery. :slight_smile:


  • Patrick

    Hi there @Symi

    I hope you're well today!

    Indeed, the Google interface has changed quite a bit lately.

    I just logged into your site to check that the data you have entered in Appointments+ Google Calendar settings looks right. Most looks OK, except perhaps for the Key file name. Please be certain that it is exactly as the name of the file you downloaded from the APIs & Auth > Credentials screen over in your Google developers account. Usually, there are no spaces between words, rather those spaces are replaced by dashes.

    However, I also checked the Logs in your Appointments+ settings and that actually looks encouraging. :slight_smile:

    The relevant error there is:
    Insert went wrong: Error calling POST (403) Forbidden

    That tells us that the permissions for the calendar you have selected are incorrect, and that the plugin cannot connect to it.

    Please go to your Google calendar and open the settings screen for your selected calendar. Scroll down to the Calendar Address section and click Change sharing settings.

    In the Share with specific people section, be sure you have added the email address of your service account, and that is exactly the same as what you have entered in Appointments+ > Settings > Google Calendar > Service account email address on your site.

    Finally, this is the most important bit: be sure that the permissions in your calendar settings are Make changes to events.

    I hope this helps! And thanks for being a member :slight_smile:

  • Symi

    hello, here's the state of the nation address on the installation on
    i've attempted to create the calendar api gadget on google, but it's a bit of a maze.
    i'm including shots without the seriously confidential numbers in the account names. :slight_smile:
    as well as a shot with the error i'm getting about mkdir that won't workk.

    i have extended the remote support if you'd like to have a lookie see.
    i have uploaded the elusive .p12 file to the correct folder.

  • Sajid

    Hi @Symi

    Hope you are doing good today :slight_smile:

    I am sorry for delay here. I can understand the process is bit difficult specially google has changed its user interface so that is why that makes it confusing.

    How I captured screenshot of changed steps for creating the .p12 key. Please see attached screenshot in the sequence they uploaded.

    I can see you are doing every thing else almost correct.

    Let me know how it goes :slight_smile:

    Cheers, Sajid

  • Symi

    Hello Sajid!

    OK - so I think I followed the directions!

    I deleted the previously created app, and started afresh.
    I created a project, enabled google calendar api, created the service account, copied the p12 file up to the correct spot on the server, added the service account to the specific calendar with the correct share permissions.
    and copied all the relevant links back to the settings page.
    saved it, and....

    Here's the errors on the settings page:
    Warning: mkdir(): Permission denied in /home/user/public_html/wp-content/plugins/appointments/includes/external/google/Cache/File.php on line 149
    [Appointments+] Test failed. Please inspect your log for more info.

    in the log i get this:
    [September 8, 2015 9:35 am] Insert went wrong: Could not create storage directory: /tmp/App_Google_Client/61
    [September 8, 2015 9:44 am] Insert went wrong: Could not create storage directory: /tmp/App_Google_Client/61

    Any ideas?

    I have enabled remote support.

  • Sajid

    Hi @Symi

    Hope you are doing good today and welcome back :slight_smile:

    Now it looks like we are on same page. The error you are getting is a directory permission error. Google cal library can not create temporary folders.

    Make sure your all parent folder permissions are set to 0755 and files should be 0644.

    Also if you are using any security and caching plugin then disable them temporarily.

    Let me know how it goes :slight_smile:

    Cheers, Sajid

  • Symi

    Hi Sajid,

    i've re-enabled support on This thread started about another website originally, but I've since had to abandon that for this one, as my deadlines on this site are more strict.


    thanks for fixing my username showing - it's showing when you go onto other pages too, so it's kinda public knowledge by now.

    you received the control panel username and password, yes? Mike said he'd pass it along.

    Uhm, i'm not sure what you mean by when i auth the gcal library. Do you mean when i ask it to test the gcal integration from the test button? well - yeah - it does.

    when trying to actually make the site go to a booking to be done, it just hangs, and eventually gives the error in the log. i'm excited that you're coming to have a look. Thanks Sajid.

  • Sajid

    Hi @Symi

    Hope you are doing good today :slight_smile:

    I logged in via support staff access and tried to test a connection. But could not make it. I got the same error of mkdir permissions.

    Yes! I got cPanel login information. I could login and changed the permissions to 777 (not recommended) and tested it again. But still same errror.

    I talked to the developer and he said some times host does not allow writing files and directories by script for security reasons.

    Please contact your host and ask them to make this directory writeable so google library (PHP script) can create temporary files/folders.

    Hope that helps :slight_smile:

    Cheers, Sajid

  • Symi

    Hi Sajid, here's the feedback from my host.

    Miranda R: Since the script is calling on 777 we'd have to set up a ticket to see if this would be allowable on the shared environment.
    symi: the domain in question is
    symi: the script doesn't call for 777, they set it to 777 to check if that sorted out the problem, which it didn't.
    symi: all we really need is for you to tell me if google's gCAL api is allowed to write to the temp folder.
    symi: if there's no reason why it can't, it means it's a wpmudev / symi problem.
    symi: if there is, i need to find another host or a way around it.
    Miranda R: It should be allowed to with no issues.

    so - the only scripts that are not wpmudev ones, is webinarignition, i think.

    the wordpress install was done through that terrible quick install interface that links you to mojo marketplace, and that ships with a cache thing from automattic methinks, but i ripped that off before much else happened.

    for the rest the site is vanilla.

    any ideas?

  • Sajid

    Hi @Symi

    Hope you are doing good today :slight_smile:

    Its weird, its clearly a dir permission error. Any how I am calling SLS (Second Line Support) for their help on this matter. They will respond here as soon as possible depending on their workload.

    I have a cPanel ifnormation but don't have WordPress admin login details in response of the email you received from Mike (its already assigned to me).

    Thanks for your patience :slight_smile:

    Cheers, Sajid

  • Symi

    Hi @Sajid,

    I have a meeting in about 6 hours with the client of this site, and I'm not sure what to advise them?

    I really need someone to have a look at this for me, and advise if i just need to decommission A+ entirely, and use a simple booking form for people to sign up for an appointment, or if we're actually going to get this to work.

    i don't want to rip it all off and 20 minutes later the dev team gets around to going to have a look...

    please advise on time frame so i can make a decision?

  • Hoang Ngo

    Hi @Symi,

    I hope you are well today and I'm sorry for the delay.

    This usually because the host. Google file will try to write the cache to system temp dir. However, in some case, the tmp dir doesn't writeable.

    We can fix this by change the system temp dir to WordPress temp dir. But this will require to update to the plugin code, which mean we will need to bring it back after each update.

    In the file /appointments/includes/external/google/Config.php line 138, you will see a code block like this

    'App_Google_Cache_File' => array(
              'directory' => sys_get_temp_dir() . '/App_Google_Client'

    Please update to

    'App_Google_Cache_File' => array(
              //'directory' => sys_get_temp_dir() . '/App_Google_Client'

    Lets see if that help for you :slight_smile:

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.