Answers.Body: <p>It looks like you are taking the contact hash directly from the database and sticking it in the URL yourself. That won't work (and for security reasons you don't want to expose the contact hash because that doesn't change).</p>
  <p>Instead, you want a contact checksum, which is generated from the hash. You can get a checksum by sending an email or mailing with the {contact.checksum} token in it. If you want to get one manually for whatever reason, you can use the API4 Explorer and do Contact getChecksum.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-08T22:01:02.760Z
Answers.Text: Thank you both! I find I can create a CSV file by merge-printing to html this string: "{contact.id}", "{contact.addressee_display}", "{contact.hash}", "{contact.checksum}","{dates.checksum_expiration}"   ... or use the API, as you suggested!
Answers.UserDisplayName: TimETown
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-08T16:36:41.387Z
Answers.LastActivityDate: 2022-11-08T16:36:41.387Z
Answers.UserDisplayName: Lars SG
Body: <p>This documentation <a href="https://docs.civicrm.org/user/en/latest/common-workflows/tokens-and-mail-merge/#checksum-contribution-pages" rel="nofollow noreferrer">https://docs.civicrm.org/user/en/latest/common-workflows/tokens-and-mail-merge/#checksum-contribution-pages</a> shows</p>
  <pre><code>        Checksum for Contribution Pages¶
  To send people to a contribution page use this path where IDNUMBER is the ID of your contribution page:
  
  Drupal: http://example.org/civicrm/contribute/transact?reset=1&amp;id=IDNUMBER&amp;{contact.checksum}&amp;cid={contact.contact_id}
  </code></pre>
  <p>It works when I am logged in, because it does not need the hash, but does not work for anonymous users.
  Other questions on StackExchange indicate Need <strong>&amp;cs=</strong> before the hash, but that also does not work.
  (Seems really weird to have a query string without a <em>variablename=</em> as part of it.)</p>
  <p>Examples where the domain is removed for security:
  Original attempt failed:
  .../civicrm/contribute/transact?reset=1&amp;id=2&amp;c8950946c952d8cdec67695d0b10cd03&amp;cid=13299</p>
  <p>Changed attempt failed (adding the &quot;cs=&quot; also makes it fail when I am logged in as admin):
  .../civicrm/contribute/transact?reset=1&amp;id=2&amp;cs=c8950946c952d8cdec67695d0b10cd03&amp;cid=13299</p>
  <p>Reordering the elements does not work, as I expected it would not.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-11-08T06:47:03.667Z
Comments.Text: That doesn't look like a proper checksum. A proper url looks like `https://example.org/civicrm/contribute/transact?reset=1&id=1&cs=a4eeb6083ff2ed04273e956f8914b937_1667889635_168&cid=60`, where the token already includes the `cs=` so don't need to add it again, and especially note the additional bit on the checksum after the underscore. I'm not sure why it would be cut off. Do you have any related extensions installed that might change the token?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-11-08T21:49:54.963Z
Comments.Text: I was exporting the data so I can created printed QR codes on letters. The field I exported was "Contact Hash" which is same as "hash" in `civicrm_contact`. Is there a way to get that data exported out?
Comments.UserDisplayName: TimETown
Tags: <civicontribute><checksum><anonymous-user><contact-hash>
Title: Checksum or hash not pulling up contribution pages for anonymous users in Drupal 7
ThreadText: # Checksum or hash not pulling up contribution pages for anonymous users in Drupal 7
  
  (Asked by: username_0 on 2022-11-07)
  
  This documentation <https://docs.civicrm.org/user/en/latest/common-workflows/tokens-and-mail-merge/#checksum-contribution-pages> shows
  
  ```
          Checksum for Contribution Pages¶
  To send people to a contribution page use this path where IDNUMBER is the ID of your contribution page:
  
  Drupal: http://example.org/civicrm/contribute/transact?reset=1&id=IDNUMBER&{contact.checksum}&cid={contact.contact_id}
  
  ```
  
  It works when I am logged in, because it does not need the hash, but does not work for anonymous users.
  Other questions on StackExchange indicate Need **&cs=** before the hash, but that also does not work.
  (Seems really weird to have a query string without a *variablename=* as part of it.)
  
  Examples where the domain is removed for security:
  Original attempt failed:
  .../civicrm/contribute/transact?reset=1&id=2&c8950946c952d8cdec67695d0b10cd03&cid=13299
  
  Changed attempt failed (adding the "cs=" also makes it fail when I am logged in as admin):
  .../civicrm/contribute/transact?reset=1&id=2&cs=c8950946c952d8cdec67695d0b10cd03&cid=13299
  
  Reordering the elements does not work, as I expected it would not.
  
  **Tags:** civicontribute, checksum, anonymous-user, contact-hash
  
  > **Comments:**
  > **username_1**: That doesn't look like a proper checksum. A proper url looks like `https://example.org/civicrm/contribute/transact?reset=1&id=1&cs=a4eeb6083ff2ed04273e956f8914b937_1667889635_168&cid=60`, where the token already includes the `cs=` so don't need to add it again, and especially note the additional bit on the checksum after the underscore. I'm not sure why it would be cut off. Do you have any related extensions installed that might change the token?  
  > **username_0**: I was exporting the data so I can created printed QR codes on letters. The field I exported was "Contact Hash" which is same as "hash" in `civicrm_contact`. Is there a way to get that data exported out?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2022-11-08. Score: 2
  
  It looks like you are taking the contact hash directly from the database and sticking it in the URL yourself. That won't work (and for security reasons you don't want to expose the contact hash because that doesn't change).
  
  Instead, you want a contact checksum, which is generated from the hash. You can get a checksum by sending an email or mailing with the {contact.checksum} token in it. If you want to get one manually for whatever reason, you can use the API4 Explorer and do Contact getChecksum.
  
  > **Comments:**
  > **username_0**: Thank you both! I find I can create a CSV file by merge-printing to html this string: "{contact.id}", "{contact.addressee_display}", "{contact.hash}", "{contact.checksum}","{dates.checksum_expiration}"   ... or use the API, as you suggested!  
  
  ---
  
  