title: Error deserializing JSON credential Data C# Google Sheets API
body: <p>I'm currently trying to use a service account to access GoogleSheets API - the problem I am having is with my .json file.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>    try
      {
          string[] scopes = new string[] { SheetsService.Scope.Spreadsheets, SheetsService.Scope.SpreadsheetsReadonly }; // Put your scopes here
  
          var stream = new FileStream("my_application_secret.json", FileMode.Open, FileAccess.Read);
  
          var credential = GoogleCredential.FromStream(stream);
          credential = credential.CreateScoped(scopes);
  
          SheetsService service = new SheetsService(new BaseClientService.Initializer()
          {
              HttpClientInitializer = credential,
              ApplicationName = "myApplication",
          });
          return service;
      }
      catch (Exception ex)
      {
          Console.WriteLine("Create service account myApplicationServiceAccount failed : " + ex.Message);
          throw new Exception("Create ServiceAccount Failed : ", ex);
      }
  </code></pre>
  
  <p>This kicks off my error which reads:</p>
  
  <pre><code>Create service account myApplicationServiceAccount failed : Error deserializing JSON credential data.
  </code></pre>
  
  <p>But everything I can find online says that what I have above should work.</p>
  
  <p>Is there something more I have to do with this .json file? </p>