Application Calendars

Required plan: Starter

Description #

Provisions a Cronofy hosted calendar for use by your application.

The application_calendar_id uniquely identifies the calendar for your application so that the first time it is used a new calendar is created, and subsequent calls return the details of the existing calendar.

Application calendars are limited to one primary calendar and cannot invite users to events.

URL format #

Example Request #

POST /v1/application_calendars HTTP/1.1
Content-Type: application/json; charset=utf-8

  "client_id": {CLIENT_ID},
  "client_secret": {CLIENT_SECRET},
  "application_calendar_id": "my-unique-string"

Example Response #

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

  "token_type": "bearer",
  "access_token": {RANDOM_TOKEN},
  "expires_in": 3600,
  "refresh_token": {RANDOM_TOKEN},
  "scope": "read_write",
  "application_calendar_id": "my-unique-string",
  "sub": "apc_567236000909002",
  "linking_profile": {
    "provider_name": "cronofy",
    "profile_id": "pro_n23kjnwrw2",
    "profile_name": "n23kjnwrw2"

Request parameters #

client_id required  #

The client_id of the client creating the calendar.

client_secret required  #

The client_secret of the client creating the calendar.

application_calendar_id required  #

The String that uniquely identifies the application calendar.

Response parameters #

token_type  #

Describes the type of the token as defined in section 7.1 of RFC 6749.

Will always be bearer.

access_token  #

The new Access Token to use to authenticate when using the API on behalf of the user.

Will always be a 32 character String of ASCII characters.

expires_in  #

An approximate number of seconds that the new Access Token will be valid for. Will always be a positive integer no greater than 2,147,483,647.

This value may be used to pre-emptively request a new Access Token when this one is expected to have already expired.

However, as being issued new Access Tokens counts for rate limiting but a 401 Unauthorized response for an invalid Access Token does not, it is recommended to use each Access Token you received for as long as possible.

refresh_token  #

The refresh_token for the granted authorization.

Will always be a 32 character String of ASCII characters.

scope  #

The Access Token Scope as defined in section 3.3 of RFC 6749.

This scope will currently return read_write scope, as this is implicitly granted to the client.

application_calendar_id optional  #

The String that uniquely identifies the application calendar.

sub optional  #

The ID of the application calendar the credentials relate to.

linking_profile optional  #

The details of the profile.

linking_profile.provider_name optional  #

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

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

linking_profile.profile_id optional  #

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.

linking_profile.profile_name optional  #

This specifies the name of the profile as a String.