Skip to content
New issue

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

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

Already on GitHub? # to your account

Endpoint: /api/Eligibility - Got rate limited, sleep for 10s - Got 403 status code #195

Open
Lavleshmishra opened this issue Jan 22, 2025 · 21 comments
Assignees

Comments

@Lavleshmishra
Copy link

[01/21/2025 10:38:13] Endpoint: /api/Eligibility
[01/21/2025 10:38:13] WARNING -> Got rate limited, sleep for 10s...
[01/21/2025 10:38:24] WARNING -> Got 403 status code

Getting this, just npm install and try with npm run start. Do all the required changed in config.yml

Copy link

Hi there 👋

You are using the free plan of the Create Issue Branch App.
Due to its popularity, offering the App for free is becoming too costly for me.
The free plan is therefore going to be deprecated on March 1st, 2025.

If you want to continue using this App, please upgrade to the Developer plan.
The Developer plan costs only $1 per month (or $10 yearly).
You can upgrade on the GitHub Marketplace

If you have any questions reach out to me by opening an issue.
To disable this message, insert freePlanWarning: false in your configuration YAML.

Copy link

@Lavleshmishra
Copy link
Author

Image still getting same.. My config.yml file is as below

personalInfo:

Load from environment secret to prevent personal info leaking

If you are using replit free plan, set this true

Then add your info to the secrets section

loadFromEnv: false

if loadFromEnv is true, anything in personalInfo beside typeId is ignored

firstName: 'Lavlesh'
lastName: 'Mishra'

Date of birth (MM/DD/YYYY)

dob: '01/08/1990'

Use real email to get appointment infomation

email: 'lavlesh@yopmail.com'

Not really needed but good to have a real one

lastFourSSN: '1029'

If you want to recieve notificaion through phone, if not keep blank

WARNING: Use number only (Ex: 111111111)

phoneNumber: ''

Serivce you needed at DPS. Check the full list on https://github.com/phamleduy04/texas-dps-scheduler/wiki/TypeId-list

If you need to apply for Texas DL you don't need to change it

typeId: 71

location:

Search DPS Locations by City Name, if City name is given, zipCode is ignored.

If you don't want to search by city name, set it to ['']

cityName: ['']

Zipcode of your location. Can add more DPS location by using ',' for multiple zipcode

zipCode: ['75069']

Choose your DPS location by yourself when running the application if set to true

pickDPSLocation: false

Get appointment from all DPS location by distance from the zipcode, will auto skip this when pickDPSLocation is true

miles: 15

Put empty [''] for any day

DPS is closed on weekends, so you can't book on Saturday and Sunday

preferredDays: ['']

Put true/false without quotes if you want to book only same day appointment

sameDay: false

Put how many day from today you want to book from start to end (7 is a good number)

daysAround:
## Start date: start and end will start counting from this date
# MM/DD/YYYY format, if blank will use current date
# If the date input is invalid or in the past, the app will automatically use the current date as start date
startDate: null
start: 0
end: 300

Put what time you want to book

timesAround:
# Number in 24h format, start = 6 and end = 18 means get appointment between 6 AM - 6 PM
start: 6
end: 18

appSettings:

Put true/false without quotes if you want to cancel the appointment automatically if found existing appointment

cancelIfExist: false

The time interval (in ms) the app will recheck for newer dates

interval: 10000

Set this to true if you using replit, heroku or something equivalent

webserver: false

Set this to higher if you encounter Header Timeout error. This one is in miliseconds

headersTimeout: 50000

How many times to retry if the request to DPS server failled

maxRetry: 3

Read this for more infomation: https://github.com/phamleduy04/texas-dps-scheduler/wiki/Captcha-(Auth-Token)

captcha:
# Avaliable options: solver, browser or manual
strategy: 'manual'
solverOptions:
solverService: 'capsolver'
solverApiToken: ''

ntfy.sh push notification

pushNotifcation:
enabled: false
baseURL: ''
topicName: ''
token: ''

what is the parameter/value I am missing here

@Lavleshmishra
Copy link
Author

Hi @phamleduy04 I am trying to run this solution from India, When I tried to run with manual captcha "captcha:
# Avaliable options: solver, browser or manual
strategy: 'manual'

solverOptions:

  #solverService: 'capsolver'
  #solverApiToken: ''

Getting WARNING -> Got 403 status code
Endpoint: /api/Eligibility
WARNING -> Got rate limited, sleep for 10s...

Can you please guide, what are the steps I am missing here? waiting for your response, at earliest.

@phamleduy04
Copy link
Owner

When you get manual token on the official website, you have to input your first name, last name, dob and last 4 ssn. Did you type it exact the same data from the config file? If not the token might get rejected

@Lavleshmishra
Copy link
Author

So everytime i had to get token from offical website? Is there any way to get it dynamically?

@phamleduy04
Copy link
Owner

there is browser and capsolver strategy. Capsolver is stable but require payment. Browser is okay but depends on others factor like your IP.

@Lavleshmishra
Copy link
Author

Lavleshmishra commented Jan 24, 2025

Hey @phamleduy04 I am using paid version of Capsolver but getting this error. (used token api key)

texas/src/Client/index.ts:120
this.responseId = response[0].ResponseId;
TypeError: Cannot read properties of null (reading '0')
at TexasScheduler.getResponseId (/home/texas/src/Client/index.ts:120:35)

const response = await this.requestApi('/api/Eligibility', 'POST', requestBody).then(res => res.data);
log.info(response); - Getting null in this query.

What else I need to do ? I am using all the information correct in config.yml

@phamleduy04
Copy link
Owner

Add more DPS location. This location return nothing (they temporarily dont have any appointment avaliable)

@mcfarlen
Copy link

I am getting the following, the same as Lavleshmishra
[01/30/2025 6:34:01] WARNING -> Got rate limited, sleep for 10s...
[01/30/2025 6:34:11] WARNING -> Got 403 status code
I am running in codespace
I did purchase capsolver and I am using that. Sorry I am new to this should I start my own separate conversation? Its the same issue. What is strange is I ran this program on Tues and Wed this week with out solver. It worked great I got two appointments scheduled. So I am now trying to run this for my spouse. But I am getting the error. I am now running it from Main, I did try the other branches as well. And as I stated I am using solver and i put my capsolver api key.

@phamleduy04
Copy link
Owner

phamleduy04 commented Jan 30, 2025

@mcfarlen so what from i understand, you are using capsolver in codespaces and got 403 rate limited is that correct?

@mcfarlen
Copy link

yes

@phamleduy04
Copy link
Owner

I tried on codespace and I was able to replicated the issue. But when migrate to local setup it worked fine. So I think texas dps is blocking codespace's IP for now. Try on local and let me know

@Lavleshmishra
Copy link
Author

@mcfarlen so what from i understand, you are using capsolver in codespaces and got 403 rate limited is that correct?

Hi @mcfarlen,

Use
captcha:
# Avaliable options: solver, browser or manual
strategy: 'solver'
solverOptions:
solverService: 'capsolver'
solverApiToken: 'Your key which you got from capsolver account',

and then it will work, we have nothing to do much on this, just make sure your zipcode is correct. It blocks local laptop IP sometime, so try to run in on somewhere, may be on AWS. it should work.

Just make sure, you have paid account on capsolver and there should have some balance on it (5$ - 10$)

@mcfarlen
Copy link

Ok thank you, I ran it from Visual Studio code and it worked. However I am trying to run it again for my son, do i need to clear cache? As it not seeing my new config I put in for him.

@phamleduy04
Copy link
Owner

Ok thank you, I ran it from Visual Studio code and it worked. However I am trying to run it again for my son, do i need to clear cache? As it not seeing my new config I put in for him.

Yes, you will need to change config.yml to your son's name. Then delete the cache folder on vscode (on the left pane)

@mcfarlen
Copy link

mcfarlen commented Jan 31, 2025

Yes I did change config.yml to my son, I now have deleted the cache folder. The problem i see is this warning message.
WARNING -> You have an existing booking at Carrollton Mega Center 02/03/2025 01:01 PM.
I checked the john doe in the example config file and he has an appointment for that date and location. This is not a date i scheduled. But it appears to be looking at the example.config.yml not my config.yml. the appointment i booked for my wife was for 3/3.
It also starts looking for appt dates of 1/31 today in my config i put 2/10/2025, Thats why I think its not using my config.yml

@phamleduy04
Copy link
Owner

It may sound dumb but did you save the config.yml file?

@mcfarlen
Copy link

ahhh yes. see i am newbie.

@phamleduy04
Copy link
Owner

It worked now?

@mcfarlen
Copy link

yes working now.. thank you

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

No branches or pull requests

3 participants