title: How to Post Comment using GitHub OAuth Token in Angular 2
body: <p>I'm trying to use GitHub OAuth Token to post comment in Angular 2. My code is </p>
  
  <pre><code>  postComment(token: string, number: Number, body: string): Promise&lt;Comment&gt; {
  let headers = new Headers()
  headers.append('Authorization', `token ${token}`)
  return this.http
    .post(`https://api.github.com/repos/${this.GITHUB_USERNAME}/${this.GITHUB_POST_REPO}/issues/${number}/comments`, {body}, {
      headers: headers
    }).toPromise()
    .then(res =&gt; res.json() as Comment)
    }
  </code></pre>
  
  <p>But it doesn't work, I alway get the reponse like this :</p>
  
  <pre><code>{
    "message": "Issue not viewable by PoiScript",
    "documentation_url": "https://developer.github.com/v3"
  }
  </code></pre>
  
  <p>By the way, I'm trying to post comment in <strong>issues</strong> instead of pr or commit.</p>