OAuth for iCloud developer guide

Diagnose an Unavailable Apple Data Connector

Fetch the connection record and read each service state before you fix anything. Match the state to its cause, then take the one action that resolves it, rather than reconnecting blindly.

Figment editorial teamPublished Updated Facts checked November 12, 2026

When an iCloud connector goes quiet or returns an error, read the exact state Figment reports for each service before you do anything else. Do not disconnect and reconnect, and do not re-authorize blindly. Every connector service carries a machine-readable state field. Match the state to its cause, then take the one action that resolves it.

How do I check the connector state?

Fetch the connection record before you attempt any fix:

curl -s -X GET https://figment.so/api/icloud/v1/connections/con_... \
  -H "Authorization: Bearer ACCESS_TOKEN"

The response has this shape:

{
  "connection": {
    "id": "con_...",
    "mode": "live",
    "services": {
      "messages": {
        "state": "needs_approval",
        "reason": "trusted_device_required",
        "observedAt": 1767280440000
      }
    }
  }
}

Only services included in the original grant appear under services. Each entry carries state, reason, and observedAt (epoch milliseconds), and reason narrows the cause when a state has more than one trigger. If the endpoint returns a non-2xx status, the connection may be revoked, the access token may have expired, or the service may be in a non-serviceable state the endpoint declines to serve. Refresh the token first and re-fetch. If the problem persists, check the connection's current status at your connection account screen.

What does each state mean, and what do I do?

This matrix covers every state a connector service can report. Confirm the state first, then use the Fix column.

StateWhat it meansTypical causeFix
connectingHandshake in progressNormal during first setupWait up to a few minutes; re-fetch
needs_approvalUser action requiredTrusted-device step, Mac system permission, or app consent not yet completedOpen the Figment connection screen to complete the pending step
syncingAuthorized; loading historyFirst-time sync or large history backfillWait; check historyComplete in list responses before reading
readyFully operationalNoneProceed with API calls; ready does not guarantee complete history
offlineMac worker cannot reach iCloudMac sleeping, network down, or iCloud signed out on the MacRestore Mac connectivity and iCloud sign-in; no user re-auth needed
reconnect_requiredApple session expired or invalidatedApple ID password change, security event, or long inactivityUser must re-authenticate through the connection screen
revokedGrant explicitly removedUser or Apple revoked third-party accessUser must reconnect through the full setup flow

The ready state confirms Figment can submit operations. It does not confirm that message history is complete, so always check historyComplete and hasMore in list responses instead of assuming full coverage.

How do I clear a needs_approval state?

Read the reason field, because needs_approval has three distinct triggers.

Trusted-device step not completed. Apple requires a trusted device to approve iCloud sign-in on a new Mac, separate from Figment's app-consent flow. The user must approve the sign-in notification on their iPhone, iPad, or another trusted Apple device before the connector can advance. Opening the Figment connection screen surfaces the pending prompt.

Mac system permission not yet granted. On macOS, contacts, calendars, and other data types each require an explicit toggle under System Settings → Privacy & Security. Flipping the iCloud switch alone does not grant application-level access to those types. See Grant the Mac Permissions Your Connector Needs for the full list of required toggles.

App consent not completed. The Figment connection screen may have been closed before every consent step finished. Re-open it and step through each approval prompt in sequence, because each capability can require a separate approval.

How do I handle offline, reconnect_required, and revoked?

All three states block operations, but each needs different remediation.

offline means the Mac worker cannot reach iCloud. The Mac may be asleep, on a network that blocks iCloud, or signed out of the Apple Account. No user re-authentication is required: once the Mac is reachable and iCloud is signed in, the connector should recover without further action.

reconnect_required means Apple invalidated the session. This happens after an Apple ID password change, a security event such as a two-factor authentication method reset, or an extended period without activity. The reason field usually identifies the trigger. The user must open the connection screen and authenticate again to restore the Apple session before the connector can process operations.

revoked means the grant was explicitly removed. Revoking an app's grant stops operations on that grant, and if the entire Apple connection is disconnected, every queued operation across the connection is cancelled. Apple documents that users can withdraw third-party authorization for Mail, Calendar, and Contacts from account.apple.com under Sign-In and Security → Account Data Sharing (Apple Support HT121539). The full Figment connection grant is managed from your connection account screen. A revoked grant cannot be restored silently. The user must go through the full connection and consent flow again from the OAuth for iCloud setup page.

Why is one service ready and another not?

A connector can be ready for one service and needs_approval or offline for another, so check the state for the specific service you call, not just the top-level connection record.

A common gap: iMessage shows ready while SMS, MMS, and RCS forwarding stays unavailable. These message types require an eligible iPhone signed in to iCloud with the same Apple Account, powered on, and online. When Messages in iCloud is enabled on the iPhone, forwarding for SMS, MMS, and RCS is built in, so a separate Text Message Forwarding toggle is not always required (Apple Support HT102545). That is an iPhone-side configuration, and no change on the Figment side enables it without those prerequisites.

Scope gaps are equally common. messages:read covers both message history and search, but messages:send is a separate scope. A connector can be authorized for reads and not for sends, so confirm the grant's scope matches what your code requests. A send attempt on a connection that holds only messages:read is rejected.

For incomplete message history on an otherwise ready connector, see Fix Missing iMessage History on a Connected Mac.

What if Apple's own services are degraded?

A connector can be healthy on the Figment side while Apple's underlying iCloud infrastructure has an incident. If several connectors go offline at the same time, check Apple's System Status page before you investigate individual connections. Apple lists iCloud Drive, iCloud Mail, iMessage, and other services individually. When Apple reports an active incident, the connector should recover automatically once Apple resolves it, and no action on the Figment side is needed.

How do I reconnect or review a connection?

To reconnect after a revoked or reconnect_required state, start the reconnection flow from the OAuth for iCloud setup page. To review or update an existing connection's granted services, visit your connection account screen.

Related reading:

Connect Apple data to your app

Register your app and start with synthetic sandbox data. Choose the permissions your app needs.

Connect Apple Account

Sandbox is free. Live access is $14 or $29 per connected Apple Account, per month.