How to insert data from access token request?

How to insert data from access token request?

My customer sent a url like this;

https://accounts.zoho.com/oauth/v2/token?refresh_token={refreshToken}&client_id={client_id}&client_secret={client_secret}&grant_type=refresh_token

I want to write a insert code according to this. My code is below but I'm not sure this code is true. I didn't find any document about send to data from access token request.


  1.  HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://accounts.zoho.com/oauth/v2/token?refresh_token={refreshToken}&client_id={client_id}&client_secret={client_secret}&grant_type=refresh_token");
            request.Method = "POST";
            JObject requestBody = new JObject();
            JArray recordArray = new JArray();
            JObject recordObject = new JObject();
    
            recordObject.Add("First_Name", contactData.FirstName);
            recordObject.Add("Mobile", contactData.PhoneNumber);
            recordObject.Add("Email", contactData.Email);
            recordObject.Add("Kategori", contactData.MessageType);
            recordObject.Add("Konu", contactData.Subject);
            recordObject.Add("Last_Name", contactData.LastName);
            recordObject.Add("Company", contactData.CompanyName);
            recordObject.Add("Sirketiniz_ile_ilgili_ozet", contactData.CompanySummary);
    
            recordArray.Add(recordObject);
            requestBody.Add("data", recordArray);
    
            string dataString = requestBody.ToString();
            var data = Encoding.UTF8.GetBytes(dataString);
            int dataLength = data.Length;
            request.ContentLength = dataLength;
            using (var writer = request.GetRequestStream())
            {
                writer.Write(data, 0, dataLength);
            }
            request.KeepAlive = true;
            HttpWebResponse response;
            try
            {
                response = (HttpWebResponse)request.GetResponse();
            }
            catch (WebException e)
            {
                if (e.Response == null) { throw; }
                response = (HttpWebResponse)e.Response;
            }
    
            HttpWebResponse responseEntity = response;
            Console.WriteLine("HTTP Status Code : " + (int)response.StatusCode);
            string responsestring = new StreamReader(responseEntity.GetResponseStream()).ReadToEnd();
            responseEntity.Close();
            Console.WriteLine(responsestring);

            Zoho DataPrep Resources


                Zoho CRM Plus Resources

                  Zoho Books Resources


                    Zoho Subscriptions Resources

                      Zoho Desk Resources

                        Zoho Projects Resources


                          Zoho Sprints Resources


                            Zoho Orchestly Resources


                              Zoho Creator Resources


                                Zoho WorkDrive Resources




                                    Zoho Campaigns Resources

                                      Zoho CRM Resources

                                                  Design. Discuss. Deliver.

                                                  Create visually engaging stories with Zoho Show.

                                                  Get Started Now




                                                      Zoho Writer Writer

                                                      Get Started. Write Away!

                                                      Writer is a powerful online word processor, designed for collaborative work.