With the RotateCookies API it doesn't return __Secure-1PSIDTS and I see the cookie expire very quickly #97

Closed
opened 2026-02-13 17:27:50 -06:00 by mirrors · 13 comments
Owner

Originally created by @MinhtienBil on GitHub (Nov 5, 2025).

Response cookies: <Cookies[<Cookie __Secure-1PSIDCC=***** for .google.com />]>
⚠️ There is no cookie '__Secure-1PSIDTS' in the response.

2025-11-05 16:12:32.872 | DEBUG | app.Services.gemini.Gemini.src.gemini_webapi.client:start_auto_refresh:221 - Cookies refreshed. New __Secure-1PSIDTS: None
2025-11-05 16:12:33.682 | DEBUG | app.Services.gemini.Gemini.src.gemini_webapi.utils.get_access_token:get_access_token:92 - Skipping loading cached cookies. Cache file not found.
2025-11-05 16:12:33.700 | DEBUG | app.Services.gemini.Gemini.src.gemini_webapi.utils.get_access_token:get_access_token:131 - Skipping loading local browser cookies from firefox. __Secure-1PSID does not match the one provided.
2025-11-05 16:12:33.700 | DEBUG | app.Services.gemini.Gemini.src.gemini_webapi.utils.get_access_token:get_access_token:148 - Skipping loading local browser cookies. Login to gemini.google.com in your browser first.
2025-11-05 16:12:34.238 | DEBUG | app.Services.gemini.Gemini.src.gemini_webapi.utils.get_access_token:get_access_token:186 - Init attempt (1/1) failed. Cookies invalid.

is there any way to avoid this situation where there is an account there is an account there is no cookie response with __Secure-1PSIDTS

Originally created by @MinhtienBil on GitHub (Nov 5, 2025). Response cookies: <Cookies[<Cookie __Secure-1PSIDCC=***** for .google.com />]> ⚠️ There is no cookie '__Secure-1PSIDTS' in the response. 2025-11-05 16:12:32.872 | DEBUG | app.Services.gemini.Gemini.src.gemini_webapi.client:start_auto_refresh:221 - Cookies refreshed. New __Secure-1PSIDTS: None 2025-11-05 16:12:33.682 | DEBUG | app.Services.gemini.Gemini.src.gemini_webapi.utils.get_access_token:get_access_token:92 - Skipping loading cached cookies. Cache file not found. 2025-11-05 16:12:33.700 | DEBUG | app.Services.gemini.Gemini.src.gemini_webapi.utils.get_access_token:get_access_token:131 - Skipping loading local browser cookies from firefox. __Secure-1PSID does not match the one provided. 2025-11-05 16:12:33.700 | DEBUG | app.Services.gemini.Gemini.src.gemini_webapi.utils.get_access_token:get_access_token:148 - Skipping loading local browser cookies. Login to gemini.google.com in your browser first. 2025-11-05 16:12:34.238 | DEBUG | app.Services.gemini.Gemini.src.gemini_webapi.utils.get_access_token:get_access_token:186 - Init attempt (1/1) failed. Cookies invalid. is there any way to avoid this situation where there is an account there is an account there is no cookie response with __Secure-1PSIDTS
Author
Owner

@kbykb commented on GitHub (Nov 5, 2025):

我是不会返回 __Secure-1PSIDTS 这个值

@kbykb commented on GitHub (Nov 5, 2025): 我是不会返回 __Secure-1PSIDTS 这个值
Author
Owner

@MinhtienBil commented on GitHub (Nov 5, 2025):

So what should I do to keep the cookies from running out? Please give me a solution.

@MinhtienBil commented on GitHub (Nov 5, 2025): So what should I do to keep the cookies from running out? Please give me a solution.
Author
Owner

@kbykb commented on GitHub (Nov 5, 2025):

So what should I do to keep the cookies from running out? Please give me a solution.

I haven't solved it yet. In fact, I am still in a state of cookie expiration from time to time, and I don't know how to refresh the cookie

@kbykb commented on GitHub (Nov 5, 2025): > So what should I do to keep the cookies from running out? Please give me a solution. I haven't solved it yet. In fact, I am still in a state of cookie expiration from time to time, and I don't know how to refresh the cookie
Author
Owner

@MinhtienBil commented on GitHub (Nov 6, 2025):

Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp.

Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie.

If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it.

@MinhtienBil commented on GitHub (Nov 6, 2025): > > Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp. > > Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie. If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it.
Author
Owner

@kbykb commented on GitHub (Nov 6, 2025):

Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp.

Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie.

If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it.

Sorry, I didn't quite understand. Where exactly should I delete __Secure-1PSIDTS and SID, and where should I press F5? If you're referring to doing this in the browser, how does that relate to me later obtaining __Secure-1PSIDTS in the API?

@kbykb commented on GitHub (Nov 6, 2025): > > > Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp. > > > > > > Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie. > > If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it. Sorry, I didn't quite understand. Where exactly should I delete __Secure-1PSIDTS and SID, and where should I press F5? If you're referring to doing this in the browser, how does that relate to me later obtaining __Secure-1PSIDTS in the API?
Author
Owner

@kbykb commented on GitHub (Nov 6, 2025):

Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp.

Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie.

If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it.

get_1psidts.py
This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS.

@kbykb commented on GitHub (Nov 6, 2025): > > > Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp. > > > > > > Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie. > > If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it. [get_1psidts.py](https://github.com/user-attachments/files/23382307/get_1psidts.py) This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS.
Author
Owner

@MinhtienBil commented on GitHub (Nov 6, 2025):

Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp.

Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie.

If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it.

get_1psidts.py This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS.

You just need to access https://myaccount.google.com/ and F12 after deleting the 1 and 2 in the image and F5 again in the network, you will see it load the API to call google.com/RotateCookies and your account will get __Secure-1PSIDTS

Image
@MinhtienBil commented on GitHub (Nov 6, 2025): > > > > Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp. > > > > > > > > > Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie. > > > > > > If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it. > > [get_1psidts.py](https://github.com/user-attachments/files/23382307/get_1psidts.py) This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS. You just need to access https://myaccount.google.com/ and F12 after deleting the 1 and 2 in the image and F5 again in the network, you will see it load the API to call google.com/RotateCookies and your account will get __Secure-1PSIDTS <img width="1021" height="771" alt="Image" src="https://github.com/user-attachments/assets/24185271-93f0-42d5-81f1-5e9c9a7f9b71" />
Author
Owner

@MinhtienBil commented on GitHub (Nov 6, 2025):

This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS.

Every time you call google.com/RotateCookies, __Secure-1PSIDTS will no longer exist, so you have to cache or update the original value you passed in.

@MinhtienBil commented on GitHub (Nov 6, 2025): > This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS. Every time you call google.com/RotateCookies, __Secure-1PSIDTS will no longer exist, so you have to cache or update the original value you passed in.
Author
Owner

@kbykb commented on GitHub (Nov 6, 2025):

Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp.

Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie.

If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it.

get_1psidts.py This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS.

You just need to access https://myaccount.google.com/ and F12 after deleting the 1 and 2 in the image and F5 again in the network, you will see it load the API to call google.com/RotateCookies and your account will get __Secure-1PSIDTS

Image

Hello, I have followed your instructions exactly, but my response headers only contain the following cookies and do not include __Secure-1PSIDTS.

Image
@kbykb commented on GitHub (Nov 6, 2025): > > > > > Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp. > > > > > > > > > > > > Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie. > > > > > > > > > If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it. > > > > > > [get_1psidts.py](https://github.com/user-attachments/files/23382307/get_1psidts.py) This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS. > > You just need to access https://myaccount.google.com/ and F12 after deleting the 1 and 2 in the image and F5 again in the network, you will see it load the API to call google.com/RotateCookies and your account will get __Secure-1PSIDTS > > <img alt="Image" width="1021" height="771" src="https://private-user-images.githubusercontent.com/183475079/510596566-24185271-93f0-42d5-81f1-5e9c9a7f9b71.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjI0MTc4NDMsIm5iZiI6MTc2MjQxNzU0MywicGF0aCI6Ii8xODM0NzUwNzkvNTEwNTk2NTY2LTI0MTg1MjcxLTkzZjAtNDJkNS04MWYxLTVlOWM5YTdmOWI3MS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwNlQwODI1NDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wNGU3NzQ5OWJkY2VjODllODA3Mzk4MTI1Yzc4ODM0NDM5YmQ3NTc0ZTk1ZmExNDY1YWQ3ZWExMDI3YTlkMDk5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Uo4XH1ntjuZpXp0wPgfU0vC6PyFWUxI7Dm_wnRNVyts"> Hello, I have followed your instructions exactly, but my response headers only contain the following cookies and do not include __Secure-1PSIDTS. <img width="605" height="592" alt="Image" src="https://github.com/user-attachments/assets/75f76ad4-d7c5-446b-b453-0aae023a639d" />
Author
Owner

@MinhtienBil commented on GitHub (Nov 6, 2025):

Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp.

Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie.

If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it.

get_1psidts.py This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS.

You just need to access https://myaccount.google.com/ and F12 after deleting the 1 and 2 in the image and F5 again in the network, you will see it load the API to call google.com/RotateCookies and your account will get __Secure-1PSIDTS
Image

Hello, I have followed your instructions exactly, but my response headers only contain the following cookies and do not include __Secure-1PSIDTS.

Image

Have you made sure that when you F5 again, the network has loaded the RotateCookies API because when you delete it, it will automatically add __Secure-1PSIDTS again, causing it to not work.

@MinhtienBil commented on GitHub (Nov 6, 2025): > > > > > > Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp. > > > > > > > > > > > > > > > Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie. > > > > > > > > > > > > If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it. > > > > > > > > > [get_1psidts.py](https://github.com/user-attachments/files/23382307/get_1psidts.py) This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS. > > > > > > You just need to access https://myaccount.google.com/ and F12 after deleting the 1 and 2 in the image and F5 again in the network, you will see it load the API to call google.com/RotateCookies and your account will get __Secure-1PSIDTS > > <img alt="Image" width="1021" height="771" src="https://private-user-images.githubusercontent.com/183475079/510596566-24185271-93f0-42d5-81f1-5e9c9a7f9b71.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjI0MTc4NDMsIm5iZiI6MTc2MjQxNzU0MywicGF0aCI6Ii8xODM0NzUwNzkvNTEwNTk2NTY2LTI0MTg1MjcxLTkzZjAtNDJkNS04MWYxLTVlOWM5YTdmOWI3MS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwNlQwODI1NDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wNGU3NzQ5OWJkY2VjODllODA3Mzk4MTI1Yzc4ODM0NDM5YmQ3NTc0ZTk1ZmExNDY1YWQ3ZWExMDI3YTlkMDk5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Uo4XH1ntjuZpXp0wPgfU0vC6PyFWUxI7Dm_wnRNVyts"> > > Hello, I have followed your instructions exactly, but my response headers only contain the following cookies and do not include __Secure-1PSIDTS. > > <img alt="Image" width="605" height="592" src="https://private-user-images.githubusercontent.com/107339994/510634972-75f76ad4-d7c5-446b-b453-0aae023a639d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjI0MTgzMjIsIm5iZiI6MTc2MjQxODAyMiwicGF0aCI6Ii8xMDczMzk5OTQvNTEwNjM0OTcyLTc1Zjc2YWQ0LWQ3YzUtNDQ2Yi1iNDUzLTBhYWUwMjNhNjM5ZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwNlQwODMzNDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xNDcxOTYyMzUwODAwNWIxYzQ5YzZiNDJlNDdhOTc5MmE4ZjU0Zjk2OGFkZjgxMjRjNjAxOGMwYWVkZWRiNjM3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.CdbhVHqeup1MuV4qDAoZ4V30EYOntv6Za0sSsYnubCs"> Have you made sure that when you F5 again, the network has loaded the RotateCookies API because when you delete it, it will automatically add __Secure-1PSIDTS again, causing it to not work.
Author
Owner

@kbykb commented on GitHub (Nov 6, 2025):

Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp.

Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie.

If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it.

get_1psidts.py This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS.

You just need to access https://myaccount.google.com/ and F12 after deleting the 1 and 2 in the image and F5 again in the network, you will see it load the API to call google.com/RotateCookies and your account will get __Secure-1PSIDTS
Image

Hello, I have followed your instructions exactly, but my response headers only contain the following cookies and do not include __Secure-1PSIDTS.
Image

Have you made sure that when you F5 again, the network has loaded the RotateCookies API because when you delete it, it will automatically add __Secure-1PSIDTS again, causing it to not work.

I've also noticed another situation: if I use a fingerprint browser or an incognito browser, deleting the SID and then pressing F5 causes the account to be logged out directly.

@kbykb commented on GitHub (Nov 6, 2025): > > > > > > > Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp. > > > > > > > > > > > > > > > > > > Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie. > > > > > > > > > > > > > > > If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it. > > > > > > > > > > > > [get_1psidts.py](https://github.com/user-attachments/files/23382307/get_1psidts.py) This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS. > > > > > > > > > You just need to access https://myaccount.google.com/ and F12 after deleting the 1 and 2 in the image and F5 again in the network, you will see it load the API to call google.com/RotateCookies and your account will get __Secure-1PSIDTS > > > <img alt="Image" width="1021" height="771" src="https://private-user-images.githubusercontent.com/183475079/510596566-24185271-93f0-42d5-81f1-5e9c9a7f9b71.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjI0MTc4NDMsIm5iZiI6MTc2MjQxNzU0MywicGF0aCI6Ii8xODM0NzUwNzkvNTEwNTk2NTY2LTI0MTg1MjcxLTkzZjAtNDJkNS04MWYxLTVlOWM5YTdmOWI3MS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwNlQwODI1NDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wNGU3NzQ5OWJkY2VjODllODA3Mzk4MTI1Yzc4ODM0NDM5YmQ3NTc0ZTk1ZmExNDY1YWQ3ZWExMDI3YTlkMDk5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Uo4XH1ntjuZpXp0wPgfU0vC6PyFWUxI7Dm_wnRNVyts"> > > > > > > Hello, I have followed your instructions exactly, but my response headers only contain the following cookies and do not include __Secure-1PSIDTS. > > <img alt="Image" width="605" height="592" src="https://private-user-images.githubusercontent.com/107339994/510634972-75f76ad4-d7c5-446b-b453-0aae023a639d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjI0MTgzMjIsIm5iZiI6MTc2MjQxODAyMiwicGF0aCI6Ii8xMDczMzk5OTQvNTEwNjM0OTcyLTc1Zjc2YWQ0LWQ3YzUtNDQ2Yi1iNDUzLTBhYWUwMjNhNjM5ZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwNlQwODMzNDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xNDcxOTYyMzUwODAwNWIxYzQ5YzZiNDJlNDdhOTc5MmE4ZjU0Zjk2OGFkZjgxMjRjNjAxOGMwYWVkZWRiNjM3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.CdbhVHqeup1MuV4qDAoZ4V30EYOntv6Za0sSsYnubCs"> > > Have you made sure that when you F5 again, the network has loaded the RotateCookies API because when you delete it, it will automatically add __Secure-1PSIDTS again, causing it to not work. I've also noticed another situation: if I use a fingerprint browser or an incognito browser, deleting the SID and then pressing F5 causes the account to be logged out directly.
Author
Owner

@MinhtienBil commented on GitHub (Nov 6, 2025):

Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp.

Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie.

If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it.

get_1psidts.py This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS.

You just need to access https://myaccount.google.com/ and F12 after deleting the 1 and 2 in the image and F5 again in the network, you will see it load the API to call google.com/RotateCookies and your account will get __Secure-1PSIDTS
Image

Hello, I have followed your instructions exactly, but my response headers only contain the following cookies and do not include __Secure-1PSIDTS.
Image

Have you made sure that when you F5 again, the network has loaded the RotateCookies API because when you delete it, it will automatically add __Secure-1PSIDTS again, causing it to not work.

I've also noticed another situation: if I use a fingerprint browser or an incognito browser, deleting the SID and then pressing F5 causes the account to be logged out directly.

Image Image like the photo I sent, I deleted it and pressed f5 again, it automatically called the API https://accounts.google.com/RotateCookies But only the first time, next time it won't call again
@MinhtienBil commented on GitHub (Nov 6, 2025): > > > > > > > > Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp. > > > > > > > > > > > > > > > > > > > > > Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie. > > > > > > > > > > > > > > > > > > If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it. > > > > > > > > > > > > > > > [get_1psidts.py](https://github.com/user-attachments/files/23382307/get_1psidts.py) This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS. > > > > > > > > > > > > You just need to access https://myaccount.google.com/ and F12 after deleting the 1 and 2 in the image and F5 again in the network, you will see it load the API to call google.com/RotateCookies and your account will get __Secure-1PSIDTS > > > > <img alt="Image" width="1021" height="771" src="https://private-user-images.githubusercontent.com/183475079/510596566-24185271-93f0-42d5-81f1-5e9c9a7f9b71.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjI0MTc4NDMsIm5iZiI6MTc2MjQxNzU0MywicGF0aCI6Ii8xODM0NzUwNzkvNTEwNTk2NTY2LTI0MTg1MjcxLTkzZjAtNDJkNS04MWYxLTVlOWM5YTdmOWI3MS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwNlQwODI1NDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wNGU3NzQ5OWJkY2VjODllODA3Mzk4MTI1Yzc4ODM0NDM5YmQ3NTc0ZTk1ZmExNDY1YWQ3ZWExMDI3YTlkMDk5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Uo4XH1ntjuZpXp0wPgfU0vC6PyFWUxI7Dm_wnRNVyts"> > > > > > > > > > Hello, I have followed your instructions exactly, but my response headers only contain the following cookies and do not include __Secure-1PSIDTS. > > > <img alt="Image" width="605" height="592" src="https://private-user-images.githubusercontent.com/107339994/510634972-75f76ad4-d7c5-446b-b453-0aae023a639d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjI0MTgzMjIsIm5iZiI6MTc2MjQxODAyMiwicGF0aCI6Ii8xMDczMzk5OTQvNTEwNjM0OTcyLTc1Zjc2YWQ0LWQ3YzUtNDQ2Yi1iNDUzLTBhYWUwMjNhNjM5ZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwNlQwODMzNDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xNDcxOTYyMzUwODAwNWIxYzQ5YzZiNDJlNDdhOTc5MmE4ZjU0Zjk2OGFkZjgxMjRjNjAxOGMwYWVkZWRiNjM3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.CdbhVHqeup1MuV4qDAoZ4V30EYOntv6Za0sSsYnubCs"> > > > > > > Have you made sure that when you F5 again, the network has loaded the RotateCookies API because when you delete it, it will automatically add __Secure-1PSIDTS again, causing it to not work. > > I've also noticed another situation: if I use a fingerprint browser or an incognito browser, deleting the SID and then pressing F5 causes the account to be logged out directly. <img width="1926" height="833" alt="Image" src="https://github.com/user-attachments/assets/286b1770-a44f-48f5-971e-6e6a3177fa58" /> <img width="1878" height="889" alt="Image" src="https://github.com/user-attachments/assets/40ca92a0-5570-46cf-b66c-da328956a157" /> like the photo I sent, I deleted it and pressed f5 again, it automatically called the API https://accounts.google.com/RotateCookies But only the first time, next time it won't call again
Author
Owner

@kbykb commented on GitHub (Nov 6, 2025):

Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp.

Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie.

If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it.

get_1psidts.py This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS.

You just need to access https://myaccount.google.com/ and F12 after deleting the 1 and 2 in the image and F5 again in the network, you will see it load the API to call google.com/RotateCookies and your account will get __Secure-1PSIDTS
Image

Hello, I have followed your instructions exactly, but my response headers only contain the following cookies and do not include __Secure-1PSIDTS.
Image

Have you made sure that when you F5 again, the network has loaded the RotateCookies API because when you delete it, it will automatically add __Secure-1PSIDTS again, causing it to not work.

I've also noticed another situation: if I use a fingerprint browser or an incognito browser, deleting the SID and then pressing F5 causes the account to be logged out directly.

Image Image like the photo I sent, I deleted it and pressed f5 again, it automatically called the API https://accounts.google.com/RotateCookies But only the first time, next time it won't call again

Thank you so much! I've noticed a weird phenomenon: the refresh only works successfully when I delete these two cookies in my regular Chrome browser. Other methods, like using an incognito browser or a fingerprint browser, all fail. I can't figure out the reason yet, but at least it's working for now.

@kbykb commented on GitHub (Nov 6, 2025): > > > > > > > > > Vậy tôi phải làm sao để cookie không bị hết? Xin hãy cho tôi một giải pháp. > > > > > > > > > > > > > > > > > > > > > > > > Tôi vẫn chưa giải quyết được vấn đề này. Thực ra, thỉnh thoảng tôi vẫn gặp tình trạng cookie hết hạn và không biết cách làm mới cookie. > > > > > > > > > > > > > > > > > > > > > If you don't find __Secure-1PSIDTS in API RotateCookies, delete __Secure-1PSIDTS and SID then F5 the page and it will automatically add it. > > > > > > > > > > > > > > > > > > [get_1psidts.py](https://github.com/user-attachments/files/23382307/get_1psidts.py) This is a script I wrote based on the project's code to retrieve __Secure-1PSIDTS. However, when I use it, I can only obtain several other cookies but cannot get a fresh __Secure-1PSIDTS. > > > > > > > > > > > > > > > You just need to access https://myaccount.google.com/ and F12 after deleting the 1 and 2 in the image and F5 again in the network, you will see it load the API to call google.com/RotateCookies and your account will get __Secure-1PSIDTS > > > > > <img alt="Image" width="1021" height="771" src="https://private-user-images.githubusercontent.com/183475079/510596566-24185271-93f0-42d5-81f1-5e9c9a7f9b71.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjI0MTc4NDMsIm5iZiI6MTc2MjQxNzU0MywicGF0aCI6Ii8xODM0NzUwNzkvNTEwNTk2NTY2LTI0MTg1MjcxLTkzZjAtNDJkNS04MWYxLTVlOWM5YTdmOWI3MS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwNlQwODI1NDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wNGU3NzQ5OWJkY2VjODllODA3Mzk4MTI1Yzc4ODM0NDM5YmQ3NTc0ZTk1ZmExNDY1YWQ3ZWExMDI3YTlkMDk5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Uo4XH1ntjuZpXp0wPgfU0vC6PyFWUxI7Dm_wnRNVyts"> > > > > > > > > > > > > Hello, I have followed your instructions exactly, but my response headers only contain the following cookies and do not include __Secure-1PSIDTS. > > > > <img alt="Image" width="605" height="592" src="https://private-user-images.githubusercontent.com/107339994/510634972-75f76ad4-d7c5-446b-b453-0aae023a639d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjI0MTgzMjIsIm5iZiI6MTc2MjQxODAyMiwicGF0aCI6Ii8xMDczMzk5OTQvNTEwNjM0OTcyLTc1Zjc2YWQ0LWQ3YzUtNDQ2Yi1iNDUzLTBhYWUwMjNhNjM5ZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwNlQwODMzNDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xNDcxOTYyMzUwODAwNWIxYzQ5YzZiNDJlNDdhOTc5MmE4ZjU0Zjk2OGFkZjgxMjRjNjAxOGMwYWVkZWRiNjM3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.CdbhVHqeup1MuV4qDAoZ4V30EYOntv6Za0sSsYnubCs"> > > > > > > > > > Have you made sure that when you F5 again, the network has loaded the RotateCookies API because when you delete it, it will automatically add __Secure-1PSIDTS again, causing it to not work. > > > > > > I've also noticed another situation: if I use a fingerprint browser or an incognito browser, deleting the SID and then pressing F5 causes the account to be logged out directly. > > <img alt="Image" width="1926" height="833" src="https://private-user-images.githubusercontent.com/183475079/510647333-286b1770-a44f-48f5-971e-6e6a3177fa58.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjI0MjA1MzcsIm5iZiI6MTc2MjQyMDIzNywicGF0aCI6Ii8xODM0NzUwNzkvNTEwNjQ3MzMzLTI4NmIxNzcwLWE0NGYtNDhmNS05NzFlLTZlNmEzMTc3ZmE1OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwNlQwOTEwMzdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hNDc4NTRlNTgxODUzMTE3MWRmNDkwYzg3ODJjYmNjMzJhM2ZlMDZhYzFiODA0NWRiODFkMTYxZTkzYzM5OWJlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.TLEtDbpEcmSro4Ponq_ZfXq97L6c1uZJ1BYyqNBgDmE"> <img alt="Image" width="1878" height="889" src="https://private-user-images.githubusercontent.com/183475079/510647529-40ca92a0-5570-46cf-b66c-da328956a157.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjI0MjA1MzcsIm5iZiI6MTc2MjQyMDIzNywicGF0aCI6Ii8xODM0NzUwNzkvNTEwNjQ3NTI5LTQwY2E5MmEwLTU1NzAtNDZjZi1iNjZjLWRhMzI4OTU2YTE1Ny5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwNlQwOTEwMzdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04MGM0Y2E0N2Y2MWNlNTBlMWE0MmNjMTZiYTY0NzA0MTA5NWRmNGRkNmE2N2UxNTA0ZGZjMmJjYTk0OGU2YjAzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.xwdLynRNauJct-j9ejD9zA-ZnHRxVSHr_xEoCy168s4"> like the photo I sent, I deleted it and pressed f5 again, it automatically called the API https://accounts.google.com/RotateCookies But only the first time, next time it won't call again Thank you so much! I've noticed a weird phenomenon: the refresh only works successfully when I delete these two cookies in my regular Chrome browser. Other methods, like using an incognito browser or a fingerprint browser, all fail. I can't figure out the reason yet, but at least it's working for now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mirrors/Gemini-API#97
No description provided.