threads-api icon indicating copy to clipboard operation
threads-api copied to clipboard

How to use proxy here?

Open MsLolita opened this issue 2 years ago • 3 comments

For example on python if there is no proxy options I can use such code:

os.environ['http_proxy'] = proxy
os.environ['https_proxy'] = proxy

to pass traffic of the entire application through a proxy. Is there any option to do it here?

MsLolita avatar Jul 15 '23 20:07 MsLolita

You can use proxy by passing it in method options like so:

const client = new ThreadsAPI();

client.getUserIDfromUsername('meta', {
    proxy: {
        host: string;
        port: number;
        auth?: {
                username: string;
                password: string;
        };
        protocol?: string;
    }
});

Digital39999 avatar Jul 22 '23 08:07 Digital39999

You can use proxy by passing it in method options like so:

const client = new ThreadsAPI();

client.getUserIDfromUsername('meta', {
    proxy: {
        host: string;
        port: number;
        auth?: {
                username: string;
                password: string;
        };
        protocol?: string;
    }
});

I tried writing "socks5", "socks" or "sock" for the protocol. They all return protocol mismatch any idea why? Proxy I'm using is socks5.

ttptracker avatar Jul 25 '23 16:07 ttptracker

I think it's just supposed to be http or https.

Digital39999 avatar Jul 26 '23 05:07 Digital39999