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_adhesive 

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);


      • Sticky Posts

      • How to Add Users to your Organization in ZohoMail?

        A better clarity so you can create other users to start using Zoho Mail. You can directly Add Users from the Control Panel to your Organization. You can invite users with the existing email address. If the person (user) already uses ZohoCRM, then you can import users from Zoho CRM. You can also import them using a .csv file. (if you are planning to add them in Bulk)  In this topic, We will be discussing on how to Add and Invite users only.  The Import options are self explanatory. ____________________________________________________________________________________________________________