Skip to main content

Connecting to OAuth Accounts

Pro PlusEvents Manager I/ORequires an Events Manager Pro Plus license. Compare plans

Before Events Manager I/O can read from or write to Google, Meetup or Facebook, the service has to agree to it. That takes two separate steps, and it helps to keep them apart in your head:

  1. Server-side credentials identify your website to the service. You create an "app" (Google calls it an OAuth client) in the service's developer console and copy its ID and secret into I/O. This is done once for the whole site, by an administrator.
  2. Service connections give that app permission to act for a particular account. You click Connect, log in at the service and approve. Each WordPress user connects their own accounts.
Before you start
  • Events Manager I/O and the plugin for the service (Google, Meetup or Facebook) are both active.
  • Your site is served over HTTPS. The services send people back to your site after they approve, and most of them refuse a plain http:// address.

Step 1: enter the service's credentials​

  1. Go to Events I/O then Settings then Server-Side Credentials. There is one box for each service plugin you have active. Click a box's title to open it.

    Each box shows the redirect URL for this site, which you copy into the service's developer console.

  2. Open the box for the service and copy the redirect URL it shows after Your url for this site is. It has this form, with the service's name in the middle:

    https://yoursite.com/wp-admin/admin-ajax.php?action=emio_google&callback=authorize
  3. Create the app at the service and give it that redirect URL. The steps differ for each one:

  4. Back in the box, enter what the service gave you. Meetup and Facebook have an App ID and an App Secret field. Google has a file upload for the JSON file you download from Google.

  5. Click Save Changes.

The redirect URL must be entered at the service exactly as shown, including https:// and everything after the question mark. A mismatch is the most common reason a connection fails.

Step 2: connect an account​

  1. Go to Events I/O then Settings then Service Connections. Each service has a panel with its logo and a Connect button.

  2. Click Connect. You are sent to the service, where you log in (if you aren't already) and approve the access it lists.

  3. The service sends you back to the settings page, and the panel now lists the account by name.

The account's calendars, sheets, groups or Pages now appear as choices in the Import Source or Export Source menu when you create an import or export in that format.

If a panel shows a message about credentials in place of the button, step 1 has not been completed for that service.

Connect more than one account​

Click Connect additional account in the service's panel and approve again, logged in to the other account at the service. Log out of the first account at the service beforehand, or it will reconnect the same one. Each import or export then lets you pick which account to use.

Disconnect or reconnect​

ControlWhat it does
Disconnect (button, with one account connected)Removes the account from this site.
Disconnect All (button, with several connected)Removes every account of this service.
Disconnect (link beside an account)Removes that account only.
ReconnectShown with a warning icon when the service no longer accepts the saved access, for example because you changed your password or revoked the app. Sends you through the approval again.
RemoveShown next to Reconnect. Removes the account instead of renewing it.

Disconnecting does not delete imports or exports that use the account, but they fail until an account is connected again and selected in them.

Connections belong to a WordPress user​

A connection is stored with the WordPress user who made it. Another administrator on the same site doesn't see your connected accounts and can't use them in their imports.

An import or export uses the accounts of the user who created it, including when it runs on a schedule. If that user is deleted, or their connection expires, the import stops working until someone creates it again under their own connection.

For a site with several administrators, pick one user to own the I/O connections and scheduled imports.

Troubleshooting​

The service shows a redirect error when you click Connect

The redirect URL saved at the service doesn't match the one your site sends. Copy it again from Events I/O then Settings then Server-Side Credentials and paste it into the app's settings at the service. Check for http where it should be https, and for www being present on one side only.

Imports started failing with a message about reauthorizing

The service has stopped accepting the saved access. Go to the Service Connections tab and click Reconnect beside the account, or disconnect it and connect again.

Connecting from a local or staging site

The services need a public address to send you back to. For development, a developer can define EMIO_OAUTH_TUNNEL in wp-config.php with the public address of a tunnel to the local site. The redirect URL shown in the settings then uses the tunnel's address.

define( 'EMIO_OAUTH_TUNNEL', 'https://your-tunnel.example.com' );