title: Google plus insert moment stopped working using google-api-dotnet-client
body: <p><strong>The question is:</strong> Is there a new way in calling the API so an activity can be inserted into a user's profile?</p>
  
  <p>I posted <a href="https://stackoverflow.com/questions/15263378/google-insert-moment-using-google-api-dotnet-client">a related question here</a> about a month ago. It was working fine until early this week when it suddenly stopped working and complained about this error:</p>
  
  <blockquote>
    <p><strong>[error message]</strong></p>
    
    <p>Error occurred while sending a direct message or getting the response</p>
    
    <p><strong>[inner exception]</strong></p>
    
    <p>The remote server returned an error: (400) Bad Request.</p>
    
    <p><strong>[stack trace]</strong></p>
    
    <p>at
    DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest
    request, DirectWebRequestOptions options)    </p>
    
    <p>at DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest
    request)    </p>
    
    <p>at  DotNetOpenAuth.Messaging.Channel.GetDirectResponse(HttpWebRequest
    webRequest)    </p>
    
    <p>at DotNetOpenAuth.Messaging.Channel.RequestCore(IDirectedProtocolMessage
    request)    </p>
    
    <p>at DotNetOpenAuth.Messaging.Channel.Request(IDirectedProtocolMessage
    requestMessage)    </p>
    
    <p>at DotNetOpenAuth.OAuth2.ClientBase.UpdateAuthorizationWithResponse(IAuthorizationState
    authorizationState, EndUserAuthorizationSuccessAuthCodeResponse
    authorizationSuccess)    </p>
    
    <p>at DotNetOpenAuth.OAuth2.WebServerClient.ProcessUserAuthorization(HttpRequestInfo
    request)    </p>
    
    <p>at GPlusWrapper.PlusWrapper.GetAuthorization(WebServerClient client) in
    \gplus_csharp_ssflow\PlusWrapper.cs:line
    122    </p>
    
    <p>at Google.Apis.Authentication.OAuth2.OAuth2Authenticator`1.LoadAccessToken()</p>
    
    <p>at Google.Apis.Authentication.OAuth2.OAuth2Authenticator<code>1.ApplyAuthenticationToRequest(HttpWebRequest
    request)<br>
    at Google.Apis.Requests.Request.CreateWebRequest(Action</code>1
    onRequestReady)    at
    Google.Apis.Requests.Request.ExecuteRequestAsync(Action<code>1
    responseHandler)    at
    Google.Apis.Requests.ServiceRequest</code>1.GetAsyncResponse(Action<code>1
    responseHandler)    at
    Google.Apis.Requests.ServiceRequest</code>1.GetResponse()    at
    Google.Apis.Requests.ServiceRequest`1.Fetch()</p>
  </blockquote>
  
  <p>At first glance one that is experienced in Google API and DNOA would say it's a DNOA issue. I've been searching for three days and the issues that I found having the same error message does not fit the issue - or the solution proposed does not fit the issue I have.</p>
  
  <p>So the next thing to do is to upgrade, yes, it make sense as the Google team may have changed something on how the API works. So I upgraded from <code>v1.2.4737.25316</code> to <code>v1.3.0.15233</code>, which is <strong>the latest stable version</strong> <a href="https://developers.google.com/resources/api-libraries/download/stable/plus/v1/csharp" rel="nofollow noreferrer">in the repo</a>.</p>
  
  <p>To make sure that it is not my code or something in my code that causes the issue, I've revisited <a href="https://github.com/gguuss/gplus_csharp_ssflow" rel="nofollow noreferrer">Gus' sample code given here</a>. That sample code used to work in <code>v1.2</code> but also stopped working in both <code>v1.2</code> and <code>v1.3</code>.</p>
  
  <p>Now since there is a new version of the library, it only make sense to re-visit <a href="https://developers.google.com/+/api/latest/moments/insert" rel="nofollow noreferrer">the docs</a> and see if something changed in the configuration or how to call the API. There seems to be nothing different in the way the API should be called.</p>
  
  <p>So I did what I did the last time in debugging the application. I tried both</p>
  
  <ul>
  <li>request_visible_actions; and</li>
  <li>requestvisibleactions</li>
  </ul>
  
  <p>and I still had the <code>access_type</code> parameter and nothing worked.</p>
  
  <p><strong>Again, my question is:</strong> Is there a new way in calling the API so an activity can be inserted into a user's profile?</p>
  
  <p><em>Please take note that I am using the server-side flow</em></p>