How to find a Device Identifier using Charles Proxy

Troubleshooting implementation issues is much easier when we have the Device Identifier of your test device. This information is important (and usually required) when contacting Urban Airship Technical Support with setup, push delivery, implementation, segmentation, or device registration issues. The Device Identifier helps Urban Airship Technical Support find the device in the system and push logs; it is used to retrieve current device information in the system, as well as locate any previously sent notifications that were supposed to be delivered to the device.

There are 3 main types of Device Identifiers used by Urban Airship:

  • Channel IDs: An identifier created by Urban Airship that is assigned to all iOS and Android app installations on a device.
  • Device TokensUsed by the Apple Push Notification System for iOS devices.
  • APIDs: Or Airship Push Identifier created by Urban Airship for Android device registration. 

Android APIDS have been superseded by Android Channels as of the release of the 5.0 Android SDK in October 2014.

This article assumes that you have the following:

  1. Physical access to the iOS or Android device.
  2. A Mac or Windows PC with the mobile device properly connected.
  3. An internet or data connection.
  4. The Charles Proxy software installed on the computer and correctly configured. If you need assistance with downloading, installing, and configuring Charles Proxy for retrieving Device IDs, please see this article for help before proceeding.

 

This guide is designed to be performed by a Mobile Developer, Software Developer, or someone with expert-level proficiency in computer use. Non-developers, novice-level computer users, or those who are not comfortable or familiar with expert-level guides and instructions will experience difficulty with this Knowledge Base article.
If you are attempting to retrieve the Channel ID or Device Token from an iOS device that is currently running iOS 9 or above, please follow the directions in SSL PROXYING WITH IOS 9 and disable ATS before you follow the directions below. You will not be able to retrieve the Channel ID or Device Token from the iOS 9 device until these steps are taken.

Channel IDs (all platforms):

A Channel ID can be found for all iOS and Android devices using Urban Airship SDK 4 or greater. Channel IDs are generated by Urban Airship and come in a standard UUID format. This is the preferred identifier for all Urban Airship applications and Urban Airship support.

To find the Channel ID in Charles Proxy:

  1. Open the Application in question on your mobile device and observe traffic in Charles Proxy.
  2. Find an item in the Sequence tab with the /api/channels/<channel_id> address: 
    Screen_Shot_2014-11-17_at_10.35.35_AM.png
  3. In the lower pane, find the URL item:
    Screen_Shot_2014-11-17_at_10.36.49_AM.png
  4. Double-click this item to open a window where the Channel ID can be copied from:
    Screen_Shot_2014-11-17_at_10.36.14_AM.png
  5. This is the Channel ID for that app on your device.

Device Token (iOS):

A Device Token is a 64 character string that is generated by the Apple Push Notification System (APNS) for all opted-in applications and background push enabled applications on iOS. 

To find the Device Token, use the same process that you would use to find the Channel ID, but looking for the /api/device_tokens/ endpoint address:

Screen_Shot_2014-11-17_at_10.48.36_AM.png

APID (Android):

An APID (Airship Push Identifier) is an Urban Airship generated Device Identifier for Android devices in the UUID format, similar to a Channel ID. 

To find an APID, use the same process that you would use to find the Channel ID, but looking for the /api/apids/ endpoint address:

Screen_Shot_2014-11-17_at_10.57.05_AM.png

 

Related Content: