Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

API returned unauthorized #30

Closed
sashacorosk opened this issue Jul 23, 2022 · 7 comments
Closed

API returned unauthorized #30

sashacorosk opened this issue Jul 23, 2022 · 7 comments
Assignees
Labels
bug Something isn't working solved

Comments

@sashacorosk
Copy link

Hey,
firstly thank you for this, it's really a nice tool to use !
I used it several times without issues. I didnt change anything but now I have this message : [11]ERROR | 20:56 || API returned unauthorized. This is most likely because of a wrong authorization token, in the configuration file.

But I cant change the authorization token.

Can you tell me what to do there ? Thank you very much !

@Avnsx Avnsx closed this as not planned Won't fix, can't repro, duplicate, stale Jul 23, 2022
@Avnsx Avnsx added the invalid This doesn't seem right label Jul 23, 2022
@Avnsx Avnsx reopened this Jul 23, 2022
@sashacorosk
Copy link
Author

it's not giving me a new token. Still the same after reseting the config file. I still have the same error message.
I'll try manually but I checked it earlier and I couldnt manage to do it

@Avnsx
Copy link
Owner

Avnsx commented Jul 23, 2022

it's not giving me a new token.

My bad I just double checked with fansly api, it seems like they've removed the authentication token from the apiv2 requests. They're mainly using api version 3 now and the authentication token is only inside the api version 3 requests (which automatic configurator is not finding). You've to type in apiv3 to find the authentication token manually now.

I will fix all this within the next couple days.

I expected this to happen, you can read about it here: #23

@Avnsx Avnsx added the bug Something isn't working label Jul 23, 2022
@sashacorosk
Copy link
Author

Yeah I read that too. So I tried with "apiv3" but I cant find anything with this search. Am I doing it wrong or it's normal till you fix it ?

@sashacorosk
Copy link
Author

But I am not sure to understand step 3.. I dont see how I have to "locate a request"

@Avnsx Avnsx added investigating currently looking into this issue and removed invalid This doesn't seem right labels Jul 23, 2022
@Avnsx
Copy link
Owner

Avnsx commented Jul 23, 2022

But I am not sure to understand step 3.. I dont see how I have to "locate a request"

When you type in "apiv3" where it asks you to in step 2 (on the picture), there'll only be a couple entries in the "names" field. One of them will be account?ids for example and you're supposed to find that one (or any other that is a apiv3 request) and look into the part where it says request headers for that request. In there you'll find the authorization token, once you copy it and paste it into the config.ini file together with your User-Agent (which you can also find in that same request), fansly scraper will work again.

But if you don't understand how to do this, you'll have to wait for me to publish the next update. Which I'll be doing once the repository reaches 200 stars.

@sashacorosk
Copy link
Author

It's ok, I find out ! it's because it wasnt looking the same to me than in the screenshot. It's working now ! thank you very much !

Repository owner deleted a comment from sashacorosk Jul 23, 2022
@Avnsx Avnsx self-assigned this Jul 23, 2022
Avnsx added a commit that referenced this issue Aug 28, 2022
fixed a bug:
+ where api would return unauthorized (#30)
+ where login request no longer returned auth token (#18)

changes:
+ added support for two factor authentication with automatic configurator

module changes:
+ removed requirement for module selenium_wire entirely
+ adjusted automatic configurator for undetected_chromedriver > 3.1.5 (please update using "pip install --upgrade undetected_chromedriver")
@Avnsx
Copy link
Owner

Avnsx commented Aug 28, 2022

Fixed in version v0.3.4
You can use the updater, to comfortably upgrade to the new version.

@Avnsx Avnsx closed this as completed Aug 28, 2022
@Avnsx Avnsx added solved and removed investigating currently looking into this issue labels Sep 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working solved
Projects
None yet
Development

No branches or pull requests

2 participants