cubehouse / themeparks

Unofficial API for accessing ride wait times and schedules for Disneyland, Disney World, Universal Studios, and many more parks
MIT License
538 stars 126 forks source link

Disneyland paris * access denied * #238

Closed matounet51 closed 4 years ago

matounet51 commented 4 years ago

Hy!

Since this morning, Disneyland Paris have an denied access:

Error fetching park wait times: 403: "\nAccess Denied\n\n

Access Denied

\n \nYou don't have permission to access \"http://api.wdpro.disney.go.com/facility-service/theme-parks&#4 7;P1;destination=dlp/wait-times?\" on this server.

\nReference #18.573a3217.1570696333.ae83d 22\n\n\n"

zacharyedwardbull commented 4 years ago

Seems that they no longer use the legacy API, and rather than moving to the same couchbase API as other Disney Parks they have created a new endpoint. I've removed the API key used since I'm not sure if it is tied to the app installation or if it is constant for everyone.

curl -H 'Host: dlp-wt.wdprapps.disney.com' 
-H 'accept: application/json, text/plain, */*' 
-H 'x-api-key: *REDACTED*' 
-H 'user-agent: okhttp/3.12.1' --compressed 'https://dlp-wt.wdprapps.disney.com/prod/v1/waitTimes'

This gives the following response

[{
    "entityId": "P1NA07",
    "type": "Attraction",
    "parkId": "0/P/P1",
    "status": "OPERATING",
    "responseTimestamp": "2019-10-10T14:28:52.726+0000",
    "singleRider": {
        "isAvailable": false,
        "singleRiderWaitMinutes": null
    },
    "postedWaitMinutes": "10"
}, 
/** snipped for brevity */
, {
    "entityId": "P2XA07",
    "type": "Attraction",
    "parkId": "0/P/P2",
    "status": "OPERATING",
    "responseTimestamp": "2019-10-10T14:28:52.727+0000",
    "singleRider": {
        "isAvailable": true,
        "singleRiderWaitMinutes": "15"
    },
    "postedWaitMinutes": "35"
}]
hemi1986 commented 4 years ago

I had the same error on my server and then ran the script locally where everything worked. I redeployed the script on the server (had to update to version 5.1.20 anyways) and now it works again. maybe the cached api access token was expired?

the lib gets an token from "https://authorization.go.com/token" (except for disney shanghai) to make further calls and this is cached in the themeparks.db sqlite database (with expire date) which gets created in your root folder when you start using the lib (just had a fast look at the implementation of the disney parks, so possibly im wrong^^). Maybe the token expired earlier for some reason?

atm everything looks fine for me and locally i wasnt able to reproduce the issue for now... maybe it helps to clear this cache and then start your app again?

cubehouse commented 4 years ago

Started a pull request. Implemented ride times, need to sort out opening hours still to merge

cubehouse commented 4 years ago

Pushed an implementation of their new API in 5.1.21. Let me know how it goes.

LouisForaux commented 4 years ago

Hey @cubehouse ! Please be careful with the names of the rides, for the moment, are in English.. For a French park ;)

But it's a great work in a short time ! It works !

cubehouse commented 4 years ago

Sorry, I don't understand your request re: English names? All parks should return English through this API where possible.

Closing this now, not heard anything from anyone regarding if this is working now for them, but it seems to be working for me.

matounet51 commented 4 years ago

Perfect for me too ! Thanks for reactivity !

matounet51 commented 4 years ago

For english names, last API returns french names. Not the new one. Corrected with PHP for me and it's perfect! Http://d-land.fr