Profile Information

Description

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

URL format

api.cronofy.com/v1/profiles

Example Request

GET /v1/profiles HTTP/1.1
Host: api.cronofy.com
Authorization: Bearer {ACCESS_TOKEN}

Example Response

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

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

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
  • office365

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.

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.

Search