---
schema_version: "1"
id: b49f87e131adae4061b765b72d6a0d3825283a98178c352f9807a99f43215781
title: getContactKey
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud-mobilepush/engagement_sdk/references/cordova/getContactKey.md
canonical_url: https://developer.salesforce.com/docs/marketing/mobile-unified-sdk/references/engagement-mobile-sdk-reference/getContactKey.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 78079ae18af6468d1e6ade1f24ede15f8c96264291d580f4dbfa7a84ee62592b
products:
  - Salesforce Engagement SDK
---
# getContactKey

Returns the contact key currently set on the device.

## Syntax

`MCCordovaPlugin.getContactKey(successCallback, [errorCallback])`

## Kind

Static method of `MCCordovaPlugin`.

## Parameters

| Parameter                    | Type       | Description              |
| ---------------------------- | ---------- | ------------------------ |
| `successCallback`            | `function` |                          |
| `successCallback.contactKey` | `string`   | The current contact key. |
| `errorCallback`              | `function` |                          |
