# Zoom Phone API header in Python

**URL:** <https://devforum.zoom.us/t/zoom-phone-api-header-in-python/82734>\
**Category:** Phone\
**Tags:** api\
**Created:** [February 7, 2023, 7:06pm UTC](https://devforum.zoom.us/t/zoom-phone-api-header-in-python/82734 "2023-02-07T19:06:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![clchrist](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/clchrist/32/45224_2.png) [@clchrist](https://devforum.zoom.us/u/clchrist)\
**Post date:** [February 7, 2023, 7:06pm UTC](https://devforum.zoom.us/t/zoom-phone-api-header-in-python/82734/1 "2023-02-07T19:06:14Z")

</div>

_Link the API endpoint(s) and/orZoom API Event(s) you’re working with to help give context._  
[Zoom Phone API - Emergency Addresses](https://marketplace.zoom.us/docs/api-reference/phone/methods/#operation/listEmergencyAddresses)

**Description**  
I am using this API to get a list of phone users who have either not entered their emergency address or are using the Main Site default address. I created an OAuth app and have been using Postman for testing, which is working. With Postman, I have a redirect URL. I’m now writing code in Python.

1. How should the OAuth redirect URL be handled now? Should I use a different API app instead?
2. How is the client ID, client secret, and endpoint used for authorization using Python? Do I need to use authorization\_code? If so, how is that done?

Thank you.

---

<div class="post-metadata">

**Author:** ![justin.steinberg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/justin.steinberg/32/9988_2.png) [@justin.steinberg](https://devforum.zoom.us/u/justin.steinberg)\
**Post date:** [February 7, 2023, 9:04pm UTC](https://devforum.zoom.us/t/zoom-phone-api-header-in-python/82734/2 "2023-02-07T21:04:05Z")

</div>

Hi Conrad,

If you are planning to write a Python script to poll this API as an internal tool, i would recommend using the “Server to Server oAuth” (S2S) app instead of the standard oAuth app. The S2S app does not require any redirect URL.

[https://marketplace.zoom.us/docs/guides/build/server-to-server-oauth-app/](https://marketplace.zoom.us/docs/guides/build/server-to-server-oauth-app/)

---

<div class="post-metadata">

**Author:** ![clchrist](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/clchrist/32/45224_2.png) [@clchrist](https://devforum.zoom.us/u/clchrist)\
**Post date:** [March 1, 2023, 8:15pm UTC](https://devforum.zoom.us/t/zoom-phone-api-header-in-python/82734/3 "2023-03-01T20:15:44Z")

</div>

Hi Justin,

Thank you for confirming. I’ve seen a few posts about creating a public IP but S2S makes more sense.

I figured out the answer to question #2 after posting this and everything has been working just fine.

Thank you for the quick response!

Conrad
