meta-ai-api icon indicating copy to clipboard operation
meta-ai-api copied to clipboard

Image access error!

Open Sm7-git opened this issue 1 year ago • 9 comments

Bro I have attached the screenshots below, the problem is that my facebook credentials are 1000% correct i am damn sure for this. But still the below error is show why? Even I have access to ai.meta.com website also and there also i can log with those credentials. I have tried more than 50 times what should i do? How could i generate images ?

Before entering credentials Input: Screenshot 2025-01-07 174651 Output: Screenshot 2025-01-07 174721

After Entering 100% correct credentials Input: Screenshot 2025-01-07 174615 Output: Screenshot 2025-01-07 174553

Sm7-git avatar Jan 07 '25 12:01 Sm7-git

They seem to have added a captcha:

Screenshot 2025-01-07 at 09 42 29

Strvm avatar Jan 07 '25 17:01 Strvm

Can we do something like, displaying the link or even captcha page to user and ask there input for captcha?

mihir20 avatar Jan 08 '25 05:01 mihir20

Then does that mean its impossible to generate images now ?

Sm7-git avatar Jan 08 '25 12:01 Sm7-git

Can we do something like, displaying the link or even captcha page to user and ask there input for captcha?

No, because then what will be the need for Api if each time the user manually enters the captcha, a package or Api is made to make tasks easier by automating the task or based on programs logic. Entering manually the captcha each time is not a good idea.

Sm7-git avatar Jan 08 '25 13:01 Sm7-git

I thought we need to do captcha verification only once per session.

mihir20 avatar Jan 08 '25 14:01 mihir20

For 1 of my personal projects I did this and it worked

replacing https://github.com/Strvm/meta-ai-api/blob/89655182ef3e56ecee15b1882ec02dbf2124d418/src/meta_ai_api/main.py#L313

with

fb_session = {'abra_sess':'GET_TOKEN_BY_LOGIN_TO_YOUR_BROWSER'}

And every time I want to use this library I get the token by login to meta ai. one token is valid for a few hours I guess.

mihir20 avatar Jan 28 '25 19:01 mihir20

This happens for me when running script in container, but when running in shell it's working fine

majnas avatar Feb 15 '25 11:02 majnas

For 1 of my personal projects I did this and it worked

replacing

meta-ai-api/src/meta_ai_api/main.py

Line 313 in 8965518

fb_session = get_fb_session(self.fb_email, self.fb_password) with

fb_session = {'abra_sess':'GET_TOKEN_BY_LOGIN_TO_YOUR_BROWSER'}

And every time I want to use this library I get the token by login to meta ai. one token is valid for a few hours I guess.

can you guide us how exactly you get the token?? i use chrome and i dont know where its located

RexsyBima avatar Mar 12 '25 13:03 RexsyBima

first go to meta.ai , make sure you are loggined there . use either meta login or facebook or instagram or create new. once login , simply click on inspect , go to network , then in prompt , tell meta to draw something like draw me a cat , switch to the network inspect one . click on any which shows as graphql , click on it , then navigate to cookies, you will see 'abra_sess' followedby a value , simply copy and paste in a textfile . now go to https://github.com/Strvm/meta-ai-api/blob/89655182ef3e56ecee15b1882ec02dbf2124d418/src/meta_ai_api/main.py#L313 , you will find fb_session = get_fb_session(self.fb_email, self.fb_password) , comment it , and then add fb_session = {'abra_sess':'abra_sess cookie , you just copied'} and save it .

Image

note : abra_sess value is very huge , the part visible is only a part of it (about 20% of the total), so copy the entire value .

rt6yr avatar Oct 31 '25 08:10 rt6yr