# GPP String

Within the IAB Global Privacy Protocol (GPP) framework, end-user consent selections are encapsulated and encoded in the GPP String (`gppString`). This compact HTTP-transferable string can be used to communicate the end-user's consent selections to downstream ad tech partners. In this article, we will cover how to:

* [Retrieve GPP String](#retrieve-gpp-string)
* [Decode GPP String](#decode-gpp-string)

***

### Retrieve GPP String

An end-user's GPP String can be retrieved by utilizing the `ping` command that comes standard with the `__gpp` function in the IAB Global Privacy Protocol (GPP) API. If the command is successful, the command will return the `PingReturn` object that will include (among other information) the end-user's `gppString`. See below for examples:

{% tabs %}
{% tab title="Browser console" %}
{% code overflow="wrap" %}

```javascript
__gpp('ping', (pingReturn, success) => {console.log('Ping request was successful: ' + success); console.log('gppString: ' + pingReturn.gppString);});
```

{% endcode %}
{% endtab %}
{% endtabs %}

<figure><img src="/files/alyP85buIrNwX9vNnG6o" alt="" width="563"><figcaption></figcaption></figure>

### Decode GPP String

Once your organization has retrieved an end-user's GPP String, leverage the [IAB GPP Encoder/Decoder](https://iabgpp.com/#) to decode the string by inputting the `gppString` value into the provided field and clicking **Decode**.

<figure><img src="/files/PCHIHCrMig4F2kpMu51t" alt="" width="563"><figcaption></figcaption></figure>

The decoded GPP String will populate in the **JSON** tab and include details for the section(s) enabled in the `gppString` .

<figure><img src="/files/cmJTDFN2P1eOJ2afzgg9" alt="" width="563"><figcaption></figcaption></figure>

The details included in any given section is dependent on the section. Please visit our resources for the national and state sections of the `gppString`.

<table><thead><tr><th width="103.25">Section ID</th><th width="91.33355712890625">API prefix</th><th>Regulation</th></tr></thead><tbody><tr><td>7</td><td><code>usnat</code></td><td><a href="/pages/yFMv9DoGtPgkA7H6KgLm">U.S. National Privacy Section</a></td></tr><tr><td>8</td><td><code>usca</code></td><td><a href="/pages/cn7rpGZ0qav4hln2IN8u">California Privacy Rights Act (CPRA)</a></td></tr><tr><td>10</td><td><code>usco</code></td><td><a href="/pages/Y32FJA2kte5objaxBdab">Colorado Privacy Act (CPA)</a></td></tr><tr><td>12</td><td><code>usct</code></td><td><a href="/pages/1JC31zoVgfD60rKqZfsM">Connecticut Data Privacy Act (CTDPA)</a></td></tr><tr><td>17</td><td><code>usde</code></td><td><a href="/pages/8opAJTMOlh4pPHJcH3Lt">Delaware Personal Data Privacy Act (DPDPA)</a></td></tr><tr><td>13</td><td><code>usfl</code></td><td><a href="/pages/PjImDsLrG1VWvCls5Fso">Florida Digital Bill of Rights (FDBR)</a></td></tr><tr><td>18</td><td><code>usia</code></td><td><a href="/pages/BW1kH7lfH45VsiHVQci1">Iowa Consumer Data Protection Act (ICDPA)</a></td></tr><tr><td>25</td><td><code>usin</code></td><td><a href="/pages/L8Au70XC655B0CyIlrur">Indiana Consumer Data Protection Act (INCDPA)</a></td></tr><tr><td>26</td><td><code>usky</code></td><td><a href="/pages/ONXUmxPYXrZMazTVXOwl">Kentucky Consumer Data Protection Act (KCDPA)</a></td></tr><tr><td>24</td><td><code>usmd</code></td><td><a href="/pages/EdxmTLmymzYozJEUzHAP">Maryland Online Data Privacy Act (MODPA)</a></td></tr><tr><td>23</td><td><code>usmn</code></td><td><a href="/pages/o6bYr6Xkh7WgKqz4ExT3">Minnesota Consumer Data Privacy Act (MNCDPA)</a></td></tr><tr><td>14</td><td><code>usmt</code></td><td><a href="/pages/ArjlnqKbMWd9BfDBBNrC">Montana Consumer Data Privacy Act (MCDPA)</a></td></tr><tr><td>19</td><td><code>usne</code></td><td><a href="/pages/3xAirZZY2qwH5tTsiCzO">Nebraska Data Privacy Act (NDPA)</a></td></tr><tr><td>20</td><td><code>usnh</code></td><td><a href="/pages/kwiMDRKUzDjm24OHry0m">New Hampshire Privacy Act (NHPA)</a></td></tr><tr><td>21</td><td><code>usnj</code></td><td><a href="/pages/coixRB4alsrebAL3lvdF">New Jersey Data Privacy Act (NJDPA)</a></td></tr><tr><td>15</td><td><code>usor</code></td><td><a href="/pages/9tOLkXVRggbxzDe7nAV6">Oregon Consumer Privacy Act (OCPA)</a></td></tr><tr><td>27</td><td><code>usri</code></td><td><a href="/pages/qXETzSrs6PKeFA35GWEJ">Rhode Island Data Transparency and Privacy Protection Act (RIDTPPA)</a></td></tr><tr><td>22</td><td><code>ustn</code></td><td><a href="/pages/gS7ev6mwXRFIM1Nw7sZk">Tennessee Information Protection Act (TIPA)</a></td></tr><tr><td>16</td><td><code>ustx</code></td><td><a href="/pages/0olGSvHQZlcvnIh10BUb">Texas Data Privacy and Security Act (TDPSA)</a></td></tr><tr><td>11</td><td><code>usut</code></td><td><a href="/pages/89nSYpn7bJ2TrLvUMBSD">Utah Consumer Privacy Act (UCPA)</a></td></tr><tr><td>9</td><td><code>usva</code></td><td><a href="/pages/XFWbsPVKAqp3Q3sZ4hww">Virginia Consumer Data Protection Act (VCDPA)</a></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.didomi.io/consent-management-platform-cmp/frameworks-regulations/iab-global-privacy-protocol-gpp/gpp-string.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
