Topic: User-Agent header for a browser extension

Posted under e621 Tools and Applications

https://e621.net/help/show/api

NOTICE #2: A non-empty User-Agent header is required for all requests. Please pick a descriptive User-Agent for your project. You are encouraged to include your e621 username so that you may be contacted if your project causes problems. DO NOT impersonate a browser user agent, as this will get you blocked. An example user-agent would be
MyProject/1.0 (by username on e621)

Are browser extensions required to change the user agent string?

Updated by Chaser

Whenever accessing the API, you should always specify a user-agent.
In cases such as browser extensions where the user-agent cannot be modified, you should include client_agent as a parameter in the query string.
However, if the browser's scripting API allows you to modify the user-agent, please do, as this is the preferred way.
For example, if you want to get the index page:
https://e621.net/post/index.json?client_agent=screaming%20hyenas%20%28By%20Chaser%29

Updated by anonymous

  • 1