I’ve come across a section in the documentation under FAQs titled ‘How is plugin data used?’
It states that plugins allow ChatGPT to interface with external apps, and when a plugin is enabled, ChatGPT may relay parts of the user’s conversation as well as their country or state information to the plugin.
I am interested in knowing the locations of the users, but I’m uncertain about how to retrieve this data. I’ve already printed all the headers from bot requests, however, this action didn’t provide me with the information I’m seeking.
The HTTP request header sent by openai is called:
It is sent with values that contain two levels of region information. A code for the country, followed by a code for the next major subdivision for that given country, like a State or a Prefecture. For example:
ES-CT - ES stands for Spain, while CT is the subdivision code for the state of Catalonia
US-CA - US stands for United States, and CA is the subdivision code for the state of California
JP-13 - JP stands for Japan, and 13 is the code assigned to Tokyo Prefecture.
I tried it with local dev server. I don’t see the openai-subdivision-1-iso-code header. Is it only available in the formal released plugin?
Maybe add it to your
Access-Control-Allow-Headers header to allow openai to send it with a CORS request? Or use
* to allow it to send all request headers.
Headers no longer include
openai-subdivision-1-iso-code. Looks like they stopped sending it.