Alkaar / resy-booking-bot

🔫 Helps to snipe hard to get reservations at restaurants that use resy
410 stars 215 forks source link

Having trouble finding the resy API key #83

Open MTH223 opened 1 year ago

MTH223 commented 1 year ago

Can you assist in finding the API key for resy? I'm new to coding, and I can't find any good advice on how to locate it. I can see the web console while accessing a resy API but there is no request header labeled authorization.

Jason-Vitale commented 1 year ago

I am also having trouble looking for the unique venueId. Maybe its because there is not a single reservation available at the moment. If anyone can help me locate the venue ID it would be much appreciated.

For the resy api key go to inspect element > network > headers (may need to click around on the page to see this) > then it gives you all the headers where u can find the API Key.

Alkaar commented 1 year ago

Hopefully, @Jason-Vitale's response was helpful.

Regarding your question @Jason-Vitale, try looking again. The README has instructions on how to find it which I re-pasted below. I just checked and you don't need a reservation available to find it.

venueId - The unique identifier of the restaurant you want to make the reservation at. Can be found when viewing available reservations for a restaurant as a query parameter in the /find API call if you have the web console open.

If the instructions are not clear, I'm happy to update the README but I try as much as possible to let people figure it out from the documentation.

Jason-Vitale commented 1 year ago

@Alkaar , thanks for the response. Still having a bit of trouble navigating where to find it since I have 0 network/server experience, I'm having a hard time navigating inspect element.

For for example I wanted to find the id of Carbone, I went to inspect element > network and looked around in there but still couldn't find much. It is definitely an easy process I'm just new to navigating inspect element.

Do you have any other suggestions or ideas on how I can locate it and what those steps would be?

UPDATE: Just located how to do it but I now have a side question. If there are multiple venue_id's listed which one's should we chose?

Corgasaurus commented 1 year ago

@Alkaar , thanks for the response. Still having a bit of trouble navigating where to find it since I have 0 network/server experience, I'm having a hard time navigating inspect element.

For for example I wanted to find the id of Carbone, I went to inspect element > network and looked around in there but still couldn't find much. It is definitely an easy process I'm just new to navigating inspect element.

Do you have any other suggestions or ideas on how I can locate it and what those steps would be?

UPDATE: Just located how to do it but I now have a side question. If there are multiple venue_id's listed which one's should we chose?

If you can't find Carbone it is 6194. I noticed they can be hidden if there are no reservations available. They also insert a default restaurant number as well. I did find an alternative way to find the venue_id by their picture in a search.

Alkaar commented 1 year ago

If there are multiple venue_id's listed which one's should we chose?

I don't think I've ever seen multiple venueIds. There are multiple places to find it but with Chrome, I go to network, then payload and you can see it in the query string parameters. It depends on the browser you are using so where to find it can differ.

azipp commented 1 year ago

I'm trying to help my sister set this up, and we're still confused how to find the needed apiKey or auth_token to fill out the config file, even after reading the questions and answers listed above.

My sister has a Macbook, and I've never used the inspect option before. What page is she supposed to inspect on? And from there, it's very confusing where to go to find the apiKey or auth_token. (We tried to follow the answer above about going to Inspect > Network > Headers, but that didn't lead to any clear apiKey or auth_token at all).

Step by step instructions would be appreciated! Thank you!

Alkaar commented 1 year ago

@azipp hey are you still having issues? It's hard to give step-by-step instructions because it depends on which browser you are using as the steps will be different. I will try to clarify your questions a bit though and see if that helps.

What page is she supposed to inspect on?

In the README where it states Try the /find API call when visiting a restaurant, it literally means visit any main restaurant page on resy. Open the web console first, then visit the page or else you won't see the API calls.

We tried to follow the answer above about going to Inspect > Network > Headers, but that didn't lead to any clear apiKey or auth_token at all

So you should be looking at the /find API call for this info but it's likely you can find it in other API calls. Usually, at the top of the Network tab is a search bar. You can just type find to narrow it down and you should see it. When you are looking at the Headers tab, you will see a list of headers. Just scroll and look for it. As per the README, you should be looking for the headers authorization and x-resy-auth-token.

I may write more detailed instructions in the future since a lot of people seem to be struggling with this but I haven't had the time as of recently.