# Zoom call API not working

**URL:** <https://devforum.zoom.us/t/zoom-call-api-not-working/54187>\
**Category:** API and Webhooks\
**Created:** [July 15, 2021, 10:34am UTC](https://devforum.zoom.us/t/zoom-call-api-not-working/54187 "2021-07-15T10:34:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ranjeetk](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@ranjeetk](https://devforum.zoom.us/u/ranjeetk)\
**Post date:** [July 15, 2021, 10:34am UTC](https://devforum.zoom.us/t/zoom-call-api-not-working/54187/1 "2021-07-15T10:34:55Z")

</div>

I referred below documentation related placing call from Zoom Call API but after hitting API it does not open Zoom client app to call on provided phone number.

> **[Initiate an outbound call - Zoom Phone - Documentation](https://marketplace.zoom.us/docs/guides/zoom-phone/outbound-call)**
>
> Initiate an outbound call
> 
> Zoom supports various URI Schemes that allow users to launch the Zoom Phone client by clicking on a secure hyperlink or a but...

API: [https://api.zoom.us/v2/{toPhoneNumber}?cat=seccall](https://api.zoom.us/v2/%7BtoPhoneNumber%7D?cat=seccall)

I used above API to place call , also provided all required info in JWT token

Thank You.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [July 16, 2021, 1:15pm UTC](https://devforum.zoom.us/t/zoom-call-api-not-working/54187/2 "2021-07-16T13:15:58Z")

</div>

Hi @ranjeetk,

To use this schema to place an outbound call, you should be formatting your URL as follows:  
`zoomphonecall://{phoneNumbertoCall}?cat=seccall&token={jwttoken}`

Let me know if this helps—thanks!  
Will

---

<div class="post-metadata">

**Author:** ![ranjeetk](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@ranjeetk](https://devforum.zoom.us/u/ranjeetk)\
**Post date:** [August 5, 2021, 3:19pm UTC](https://devforum.zoom.us/t/zoom-call-api-not-working/54187/3 "2021-08-05T15:19:31Z")

</div>

I used below code to access zoom API still it is not working  
I kept all below things while accessing Zoom API

1. Created Zoom API Secret Key and API System Key.
2. Having Zoom app opened with valid user.
3. Providing all necessary details for JWT token.

Code:

DateTime utcNow = DateTime.UtcNow;  
string apiSecretkey = “XXXXXXXXXXXXXXXXXXXXXXX”;  
string apikey = “XXXXXXXXXXXXXX”;  
byte symetricKey = Encoding.ASCII.GetBytes(apiSecretkey);  
string toPhoneNumber = “+1234567890”;

```
            long currentEpochTimeSeconds = ((DateTimeOffset)utcNow).ToUnixTimeSeconds(); // current epoch timestamp in seconds in long format
            long tokenExpiryTimeSeconds = ((DateTimeOffset)utcNow.AddSeconds(300)).ToUnixTimeSeconds(); //expiration timestamp for the JWT in seconds in long format

            SigningCredentials credentials = new SigningCredentials(new SymmetricSecurityKey(symetricKey), SecurityAlgorithms.HmacSha256);
            JwtHeader header = new JwtHeader(credentials);

            JwtPayload payload = new JwtPayload
            {
                { "iss", apikey},
                { "iat", currentEpochTimeSeconds },
                { "exp", tokenExpiryTimeSeconds },
                { "oid", toPhoneNumber },
                { "uid", "abc@xyz.com" } // EmailAddress which user must logged into the Zoom Client app using their Zoom account.
            };

            SecurityToken token = new JwtSecurityToken(header, payload);
            JwtSecurityTokenHandler tokenHandler = new JwtSecurityTokenHandler();

            string tokenString = tokenHandler.WriteToken(token);

            string url = $"https://api.zoom.us/v2/zoomphonecall://{toPhoneNumber}?cat=seccall&token={tokenString}";
            RestClient client = new RestClient(url);

            RestRequest request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");

            IRestResponse restResponse = client.Execute(request);

```

Please let me know if I’m missing anything.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [August 6, 2021, 6:29pm UTC](https://devforum.zoom.us/t/zoom-call-api-not-working/54187/4 "2021-08-06T18:29:21Z")

</div>

Hi @ranjeetk,

What’s happening when you use the schema? Are you getting an error of any kind or you’re just not seeing the app launch?

And do you meet both of these prerequisites?  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/c/bc6d243dbf1ef7e30c02324e19296213a3811e59.png)

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [September 6, 2021, 4:29am UTC](https://devforum.zoom.us/t/zoom-call-api-not-working/54187/5 "2021-09-06T04:29:49Z")

</div>

Closed on September 6, 2021, 4:29am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
