Error getting user's phone number through ZAF Client | Community
Skip to main content

Error getting user's phone number through ZAF Client

  • August 8, 2024
  • 1 reply
  • 0 views

Dan45

I am using ticket.requester.phone as the placeholder in my app which is supposed to pull a user's phone number and then search my company's API for their info to display. I keep getting the error

 

InvalidPathError: Path 'phone' doesn't exist on node ‘requester’

 

Does anyone know another way to pull this? It works just fine using ticket.requester.email

const client = ZAFClient.init();
client.invoke('resize', { width: '100%', height: '300px' });
let phone_number;

// Use the Zendesk app client to get the ticket requester's phone
client.get('ticket.requester.phone')

.then(async function(data) {
  const phone_number = data['ticket.requester.phone'];

1 reply

  • January 26, 2026

Same here.

I know it's old, but have you found a solution?

There is no phone field in the ticket, but how do I get the phone number from the user data?

client.get('user')… doesn't work either