title: Pinterest API Error 405 POST Request
body: <p>I'm having an issue with sending a POST request for Pinterest in a UWP app I'm working on. I already have the access code from a previous WebAuthenticationBroker function. I've tried using the WebAuthenticationBroker with the UseHttpPost option under options with authenticating async, but, as I've provided my if functions, it returns ERROR. I just get a "message": "405: Method Not Allowed" and "type" : "http". I've looked all over, I've even tried using an HttpClient and PostAsync(), but I couldn't get it to get the access token. Any advise to what I'm doing wrong?</p>
  
  <pre><code>private void OutputToken(string TokenUri)
      {
          int tokenString = TokenUri.IndexOf('=');
          string TheTokenUri = TokenUri.Substring(tokenString + 54);
          PinterestReturnedTokenText.Text = TheTokenUri;
          outputToken = TheTokenUri;
      }
  
      private async void auth()
      {
          try
          {
              string CallbackUrl = "https://localhost/";
              string PinterestUrl = "https://api.pinterest.com/v1/oauth/token?grant_type=authorization_code&amp;client_id=" + PinterestClientID + "&amp;client_secret=" + PinterestClientSecret + "&amp;code=" + outputCode;
  
              Uri StartUri = new Uri(PinterestUrl);
              Uri EndUri = new Uri(CallbackUrl);
  
              WebAuthenticationResult WebAuthenticationResult = await WebAuthenticationBroker.AuthenticateAsync(WebAuthenticationOptions.UseHttpPost, StartUri, EndUri);
              if (WebAuthenticationResult.ResponseStatus == WebAuthenticationStatus.Success)
              {
                  OutputToken(WebAuthenticationResult.ResponseData.ToString());
                  await GetPinterestNameAsync(WebAuthenticationResult.ResponseData.ToString());
              }
              else if (WebAuthenticationResult.ResponseStatus == WebAuthenticationStatus.ErrorHttp)
              {
                  OutputToken("HTTP Error returned by AuthenticateAsync() : " + WebAuthenticationResult.ResponseErrorDetail.ToString());
              }
              else
              {
                  OutputToken("Error returned by AuthenticateAsync() : " + WebAuthenticationResult.ResponseStatus.ToString());
              }
          }
          catch (Exception Error)
          {
              PinterestReturnedTokenText.Text = "ERROR";
          }
      }
  </code></pre>