Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

401 Error with Surfline v2 API: Login and Forecast Endpoints #65

Open
MustangWu opened this issue Dec 3, 2024 · 2 comments
Open

401 Error with Surfline v2 API: Login and Forecast Endpoints #65

MustangWu opened this issue Dec 3, 2024 · 2 comments

Comments

@MustangWu
Copy link

I am currently working on a project where I aim to fetch surf forecast data using Surfline's v2 API. I followed the instructions in your repository, but I encountered a few challenges:

  1. When using the login endpoint (https://services.surfline.com/user/login), I receive a 401 Unauthorized error despite providing valid Premium credentials.
  2. I attempted to call the forecast endpoint (https://services.surfline.com/kbyg/spots/forecast) with the required parameters and authorization token, but I still couldn't fetch the data.

Could you kindly clarify:

  • Are there any additional headers or parameters required for successful authentication?
  • Is there an updated example of how to structure the requests for v2?

Thank you for your work on this project. I appreciate your guidance!

@swrobel
Copy link
Owner

swrobel commented Dec 3, 2024

I believe everything in my documentation is accurate and currently working, but you can of course check the code to verify that. Bear in mind that this API is officially undocumented, and I've done my best to document what I've discovered.

@MustangWu
Copy link
Author

I believe everything in my documentation is accurate and currently working, but you can of course check the code to verify that. Bear in mind that this API is officially undocumented, and I've done my best to document what I've discovered.

Thanks for your quick reply! I've found another API called storm glass and it has accurate surf info too : )

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

No branches or pull requests

2 participants