# Use phone number of incoming call to trigger a database request

**URL:** <https://forums.kodeco.com/t/use-phone-number-of-incoming-call-to-trigger-a-database-request/74851>\
**Category:** iOS\
**Created:** [June 26, 2019, 8:45am UTC](https://forums.kodeco.com/t/use-phone-number-of-incoming-call-to-trigger-a-database-request/74851 "2019-06-26T08:45:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andersv](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/andersv/32/81494_2.png) [@andersv](https://forums.kodeco.com/u/andersv)\
**Post date:** [June 26, 2019, 8:45am UTC](https://forums.kodeco.com/t/use-phone-number-of-incoming-call-to-trigger-a-database-request/74851/1 "2019-06-26T08:45:10Z")

</div>

Hi!

I would like to use the phone number of an incoming call to trigger a server request. More specifically, I have a list of the phone numbers of the users of the app, and ideally I would like to match the phone number of an incoming call to one of these. If there is a match, I want this to trigger the mentioned server request.

I know that CallKit enables the link between the native phone UI and VoIP apps, but in my case I just want to link the incoming call from the native phone system via (possibly) CallKit to the matching script, and finally from the matching to the server.

I know that Apple considers incoming call phone numbers private, which makes it impossible to extract phone numbers directly, but can you think of a way to trigger this server request?

---

<div class="post-metadata">

**Author:** ![syedfa](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/syedfa/32/101500_2.png) [@syedfa](https://forums.kodeco.com/u/syedfa)\
**Post date:** [July 1, 2019, 3:41am UTC](https://forums.kodeco.com/t/use-phone-number-of-incoming-call-to-trigger-a-database-request/74851/2 "2019-07-01T03:41:18Z")

</div>

@andersv Thanks very much for your question!

If Apple considers incoming phone calls private, then I am not sure if it will be possible to trigger a unique action based on a call received. With Apple buckling down on privacy issues, I think actions like this will not be possible.

Perhaps you may want to consider an alternative approach like using a separate app that the user must use to make calls like WhatsApp? Just an idea.

I hope this helps!

All the best.

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [December 10, 2019, 12:46am UTC](https://forums.kodeco.com/t/use-phone-number-of-incoming-call-to-trigger-a-database-request/74851/3 "2019-12-10T00:46:13Z")

</div>

This topic was automatically closed after 166 days. New replies are no longer allowed.
