title: Telegram Bot API: getChatMember throws USER_ID_INVALID for valid user
body: <p>I'm trying to find out if a specific <code>User</code> is present in a supergroup, in order to keep track of those who left. </p>
  
  <p>For that, I'm calling the Bot API method <code>getChatMember</code> for each <code>User</code> and checking if their status is either <code>Left</code> or <code>Kicked</code>. However, I noticed that (recently?) I'm getting <code>USER_ID_INVALID</code> errors for many <strong>valid</strong> users that are either in the supergroup or have been in the past and then left. I also confirmed that those accounts are <strong>still active</strong> on Telegram. </p>
  
  <p>Here's the HTTP request I'm sending:</p>
  
  <pre><code>POST https://api.telegram.org/botXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX/getChatMember HTTP/1.1
  Connection: Keep-Alive
  Content-Type: application/json; charset=utf-8
  Content-Length: 46
  Host: api.telegram.org
  
  {"chat_id":-0000000000000,"user_id":000000000}
  </code></pre>
  
  <p>And here's the response I'm getting:</p>
  
  <pre><code>HTTP/1.1 400 Bad Request
  Server: nginx/1.12.2
  Date: Fri, 20 Apr 2018 04:17:32 GMT
  Content-Type: application/json
  Content-Length: 74
  Connection: keep-alive
  Access-Control-Allow-Origin: *
  Access-Control-Expose-Headers: Content-Length,Content-Type,Date,Server,Connection
  
  {"ok":false,"error_code":400,"description":"Bad Request: USER_ID_INVALID"}
  </code></pre>
  
  <p>Any way I look at it, it looks like a perfectly valid request to me. And I haven't been able to find a common pattern between the users that throw this error. </p>
  
  <p>What am I missing here?</p>
  
  <p><strong>EDIT:</strong> As @sean pointed out, having one of those users message the bot privately fixed the error <em>for that particular user</em>. <strong>But I'm absolutely sure that user was seen before because that's how I got his user ID</strong>. What could have caused the bot "forget" about him and how would I prevent this from happening in the future? </p>