title: What is the data type of a Google Account's unique user identifier?
body: <p>The unique identifier is documented <a href="https://developers.google.com/accounts/docs/OpenIDConnect#obtainuserinfo" rel="nofollow">here</a> as being the "sub" field on ID tokens. The "sub" field value is too large to be 64-bit number. Should it just be considered a string then (for the purposes of storing in a database for example)?</p>
  
  <p>In case the linked content ever changes, below are the relevant details.</p>
  
  <p><strong>ID Token Example</strong></p>
  
  <pre><code>{
    "iss":"accounts.google.com",
    "at_hash":"HK6E_P6Dh8Y93mRNtsDB1Q",
    "email_verified":"true",
    "sub":"10769150350006150715113082367",
    "azp":"1234987819200.apps.googleusercontent.com",
    "email":"jsmith@example.com",
    "aud":"1234987819200.apps.googleusercontent.com",
    "iat":1353601026,
    "exp":1353604926
  }
  </code></pre>
  
  <p><strong>sub Description</strong></p>
  
  <p>"An identifier for the user, unique among all Google accounts and never reused. A Google account can have multiple emails at different points in time, but the sub value is never changed. Use sub within your application as the unique-identifier key for the user."</p>
  
  <p>Thanks!</p>