Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO: Dynamic operation IDs #1

Open
dropout1337 opened this issue Nov 27, 2023 · 0 comments
Open

TODO: Dynamic operation IDs #1

dropout1337 opened this issue Nov 27, 2023 · 0 comments

Comments

@dropout1337
Copy link

The configuration set here is subject to change. By sending a GET request to https://twitter.com/, the response body will contain a URL for main.*.js, for example:

<link rel="preload" as="script" crossorigin="anonymous" href="https://abs.twimg.com/responsive-web/client-web/main.546c97da.js" />
<meta property="fb:app_id" content="2231777543" />

Upon inspecting the content of main.546c97da.js, you'll find operation IDs, like this:

    981755: e=>{
        e.exports = {
            queryId: "9LlZicVr2IBf4u2qW5n4-A",
            operationName: "Followers",
            operationType: "query",
            metadata: {
                featureSwitches: ["responsive_web_graphql_exclude_directive_enabled", "verified_phone_label_enabled", "responsive_web_home_pinned_timelines_enabled", ... ],
                fieldToggles: ["withAuxiliaryUserLabels", "withArticleRichContentState"]
            }
        }
    }

Parsing the JavaScript file allows you to extract the operation IDs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant