Create meeting API gives 401 error in server
When I create a meeting locally it working fine but not in production(server) var tokenHandler = new System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler(); var tokenDescriptor = new SecurityTokenDescriptor var token = tokenHandler.CreateToken(tokenDescriptor); var client = new RestClient("https://api.zoom.us/v2/users/rahulchaudhary.sce@gmail.com/meetings"); request.AddHeader("authorization", String.Format("Bearer {0}", tokenString));
var now = DateTime.UtcNow;
var apiSecret = "***************";
byte[] symmetricKey = Encoding.ASCII.GetBytes(apiSecret);
{
Issuer = "********",
Expires = now.AddSeconds(300),
SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(symmetricKey), SecurityAlgorithms.HmacSha256),
};
var tokenString = tokenHandler.WriteToken(token);
var request = new RestRequest(Method.POST);
request.RequestFormat = DataFormat.Json;
request.AddJsonBody(new { topic = "Meeting with Rahul", duration = "10", start_time = "2021-04-20T05:00:00", type = "2" });
IRestResponse restResponse = client.Execute(request);
HttpStatusCode statusCode = restResponse.StatusCode;
int numericStatusCode = (int)statusCode;
var jObject = JObject.Parse(restResponse.Content);
Show less