Profile Information

Required plan: Starter

Description #

Returns a list of all the authenticated user’s calendar profiles.

URL format #

{data_center_url}/v1/profiles

Example Request #

GET /v1/profiles HTTP/1.1
Host: {data_center_url}
Authorization: Bearer {ACCESS_TOKEN}

Example Response #

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "profiles": [
    {
      "provider_name": "google",
      "provider_service": "gsuite",
      "profile_id": "pro_n23kjnwrw2",
      "profile_name": "example1@cronofy.com",
      "profile_connected": true,
      "profile_initial_sync_required": false
    },
    {
      "provider_name": "exchange",
      "provider_service": "office365",
      "profile_id": "pro_fe145c37de",
      "profile_name": "example2@cronofy.com",
      "profile_connected": false,
      "profile_initial_sync_required": false,
      "profile_relink_url": "https://app.cronofy.com/relink/apple?email=example@cronofy.com"
    }
  ]
}

Request parameters #

data_center_url required

The URL for the data center you want to communicate with. Possible choices are:

  • api-au.cronofy.com - πŸ‡¦πŸ‡Ί Australia
  • api-ca.cronofy.com - πŸ‡¨πŸ‡¦ Canada
  • api-de.cronofy.com - πŸ‡©πŸ‡ͺ Germany
  • api-sg.cronofy.com - πŸ‡ΈπŸ‡¬ Singapore
  • api-uk.cronofy.com - πŸ‡¬πŸ‡§ United Kingdom
  • api.cronofy.com - πŸ‡ΊπŸ‡Έ United States

Find out more about Cronofy's data centers.

Response parameters #

profiles.provider_name  #

This specifies the provider of the calendar as a lowercase, ASCII-only String.

Currently one of:

  • apple
  • cronofy
  • exchange
  • google
  • live_connect

However, this will be expanded over time and therefore consumers should support any value for this field.

profiles.provider_service  #

This specifies the service that hosts the calendar as a lowercase, ASCII-only String.

Currently one of:

  • cronofy
  • exchange
  • google
  • gsuite
  • icloud
  • office365
  • outlook_com

However, this will be expanded over time and therefore consumers should support any value for this field.

This should be used to help a user distinguish between their profiles as they can have multiple profiles with the same name.

profiles.profile_id  #

This specifies the ID of the profile, a profile may consist of many calendars, as an ASCII-only String.

This is used for targetting other API actions toward this profile.

profiles.profile_name  #

This specifies the name of the profile as a String.

profiles.profile_connected  #

This specifies whether we have an active connection for this profile, usually whether we have valid credentials or not, as a Boolean.

profiles.profile_initial_sync_required  #

This specifies whether we have performed an initial sync this profile, this is a function of the number of events, and therefore the quantity of data, in their calendar and can take between a few seconds and a few minutes from the accounts first connection.

When the profile is not connected, a URL will be provided as a String that you can direct the user to in order for them to reconnect this profile.

This URL is unique to each profile as it contains information relating to the underlying provider and so forth.

Error responses #

401 Unauthorized #

The request was refused as the provided authentication credentials were not recognized.

When an OAuth refresh_token is available then it should be used to request a replacement auth_token before the request is retried.