<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreTelephony",
  "identifier" : "/documentation/CoreTelephony/CTCellularPlanStatus/getTokenWithCompletion(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Telephony"
    ],
    "preciseIdentifier" : "c:objc(cs)CTCellularPlanStatus(cm)getTokenWithCompletion:"
  },
  "title" : "getTokenWithCompletion(_:)"
}
-->

# getTokenWithCompletion(_:)

Retrieves and stores the token associated with your app.

```
class func getTokenWithCompletion(_ completionHandler: @escaping @Sendable (String?, (any Error)?) -> Void)
```

```
class func token() async throws -> String
```

## Parameters

`completionHandler`

A closure the framework calls with the retrieved token and any error that occurs.

## Discussion

Your app has 30 seconds to call this method after the system generates the token before the system invalidates it. The framework maps the token to the ICCID associated with the original <doc://com.apple.documentation/documentation/MessageUI/MFMessageComposeViewController> instance used for UPI device validation.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)