cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
240
Views
1
Helpful
2
Replies

How to get the "primary mail address" of people with API?

Urs Wuest
Level 5
Level 5

People can have several mail addresses, but one or them is the "primary mail address".
So the question is, how to get this "primary mail address" via API from people.
The reason ist when call a GET with parameter email you have to use the "primary mail address", otherwise you will not find the people.
And when calling a GET without parameters, it is not clear which of the emails string array is "primary mail address".

1 Accepted Solution

Patience Umoru
Cisco Employee
Cisco Employee

Thank you for reaching out to Webex Developer Support. To identify a user’s primary email address, we recommend using the SCIM 2.0 Users API https://developer.webex.com/admin/docs/api/v1/scim-2-users  instead of the standard People API. The SCIM response clearly indicates which email is primary using a "primary": true flag.

For example:

"emails": [
  {
    "value": "Todayandtom@gmail.com",
    "type": "work"
  },
  {
    "value": "Todayandtom@gmail.com",
"type": "work", "primary": true } ]

The People API, on the other hand, returns an email list but does not specify which one is the primary, which can make searches less reliable if you're not using the exact email address.

View solution in original post

2 Replies 2

Urs Wuest
Level 5
Level 5

Perfect! Thanks a lot.

Patience Umoru
Cisco Employee
Cisco Employee

Thank you for reaching out to Webex Developer Support. To identify a user’s primary email address, we recommend using the SCIM 2.0 Users API https://developer.webex.com/admin/docs/api/v1/scim-2-users  instead of the standard People API. The SCIM response clearly indicates which email is primary using a "primary": true flag.

For example:

"emails": [
  {
    "value": "Todayandtom@gmail.com",
    "type": "work"
  },
  {
    "value": "Todayandtom@gmail.com",
"type": "work", "primary": true } ]

The People API, on the other hand, returns an email list but does not specify which one is the primary, which can make searches less reliable if you're not using the exact email address.