Closed tpxtron closed 3 years ago
All requests use the same hardcoded Bearer token:
eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI4IiwianRpIjoiMTRlZDg0MjdhOTk3ZWFjNzlkMjFlMzQ3NWZjYjU0YmY2MGNjZDA2MTg4NWQ5MGNhNTc2OGQ1YzNkNTRhMzFmMmJlNGU2OTE1MGEwYmNmZjkiLCJpYXQiOjE2MDAxNTYzMTgsIm5iZiI6MTYwMDE1NjMxOCwiZXhwIjoxNjMxNjkyMzE4LCJzdWIiOiIzIiwic2NvcGVzIjpbXX0.EvvdV2Faf1XLvLthDkgEfuC_GCEzP0fDwiWocWB7wwM5U00uuuDnXD_RKw1ts0awzL4mZu-65INP7mx2rupHDCkI_5wbFHf_bHuduCjUVHgYvaJ_XGpYjjhHqGLI5K2LZ6GEv5w2EonY3-SG7Y54uS7diXcu9xRwpKXX7PU2yVOw-xJA9ayfWaRHRdlyi1LAWe67Q9Y8oJiaDVDHGhYCgxOHhlfUqKkFyVJVCruKbVoLGFLL9tpk6mxpp_b14GUsiCjmsk9e0BSZZ9I3h4UVhpc9MvkofCsczgfABgyZp71fWvpuF-k0H1veoqoL2C4hdkZizlcGkhryV05i7KaflJezZ554xoFj5DJgxoLmStHTlaKF6l4740aJ-iuSNn2XvV3jKLbKy-t8aNWeCiuqMmRnPlHSnqYC2Yqz4XMUx3z3IVLsQj2ig3EVVAWafGiWxaFc6JyiGtIo7O_beJtIfcvwy_A7ytb0jt13zWwQHw32KQplo0XL7YGxinM3hialUhKSpSuVpwGQgrG68UnU1kkAq5n5P38vvXa1tAKsXnANuc2aDje1s20umKThmT-b728UoJ-moZ9MHpqEhqxsRjVoFSK2Uhnok_vtm-Uf7GAFIHuGVlsKa-r8gdnATHQgE5gxO7N8EFTt_1wFFl3vMjAwp9xJpw9hPgwAQ6ww210
API-Host: https://api.toverland.com/v1
List of endpoints: '/park/ride/list' '/park/ride/operationInfo/list' "/park/ride/list/" + t "/park/ride/" + t + "/status" "/park/ride/" + t + "/times" "/park/ride/" + t + "/waitingTimes"
'/park/foodAndDrinks/list' '/park/foodAndDrinks/operationInfo/list' "/park/foodAndDrinks/list/" + t "/park/foodAndDrinks/" + t + "/status" "/park/foodAndDrinks/" + t + "/times"
'/park/shop/list' '/park/shop/operationInfo/list' "/park/shop/list/" + t "/park/shop/" + t + "/status" "/park/shop/" + t + "/times"
'/park/show/list' '/park/show/operationInfo/list' "/park/show/list/" + t "/park/show/" + t + "/times"
"/park/services/list" "/park/services/categories" "/park/services/list/" + t
"/park/halloween/list" "/park/halloween/categories" "/park/halloween/list/" + t "/park/halloween/operationInfo/list" "/park/halloween/operationInfo/list/" + t "/park/halloween/" + t + "/info"
Example request using cUrl:
curl --location --request GET 'http://api.toverland.com/v1/park/ride/operationInfo/list' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI4IiwianRpIjoiMTRlZDg0MjdhOTk3ZWFjNzlkMjFlMzQ3NWZjYjU0YmY2MGNjZDA2MTg4NWQ5MGNhNTc2OGQ1YzNkNTRhMzFmMmJlNGU2OTE1MGEwYmNmZjkiLCJpYXQiOjE2MDAxNTYzMTgsIm5iZiI6MTYwMDE1NjMxOCwiZXhwIjoxNjMxNjkyMzE4LCJzdWIiOiIzIiwic2NvcGVzIjpbXX0.EvvdV2Faf1XLvLthDkgEfuC_GCEzP0fDwiWocWB7wwM5U00uuuDnXD_RKw1ts0awzL4mZu-65INP7mx2rupHDCkI_5wbFHf_bHuduCjUVHgYvaJ_XGpYjjhHqGLI5K2LZ6GEv5w2EonY3-SG7Y54uS7diXcu9xRwpKXX7PU2yVOw-xJA9ayfWaRHRdlyi1LAWe67Q9Y8oJiaDVDHGhYCgxOHhlfUqKkFyVJVCruKbVoLGFLL9tpk6mxpp_b14GUsiCjmsk9e0BSZZ9I3h4UVhpc9MvkofCsczgfABgyZp71fWvpuF-k0H1veoqoL2C4hdkZizlcGkhryV05i7KaflJezZ554xoFj5DJgxoLmStHTlaKF6l4740aJ-iuSNn2XvV3jKLbKy-t8aNWeCiuqMmRnPlHSnqYC2Yqz4XMUx3z3IVLsQj2ig3EVVAWafGiWxaFc6JyiGtIo7O_beJtIfcvwy_A7ytb0jt13zWwQHw32KQplo0XL7YGxinM3hialUhKSpSuVpwGQgrG68UnU1kkAq5n5P38vvXa1tAKsXnANuc2aDje1s20umKThmT-b728UoJ-moZ9MHpqEhqxsRjVoFSK2Uhnok_vtm-Uf7GAFIHuGVlsKa-r8gdnATHQgE5gxO7N8EFTt_1wFFl3vMjAwp9xJpw9hPgwAQ6ww210'
Example response:
I'm on it. Currently, I am trying to figure out where the overall park opening times can be found. Any clue if there maybe is another URL that just delivers the park opening dates/times? I don't want to "abuse" a random ride opening time for today's hours...
Any clue if there maybe is another URL that just delivers the park opening dates/times? I don't want to "abuse" a random ride opening time for today's hours...
I haven't checked what the actual app does, I think if it displays the opening times for the whole park natively then there is probably a dedicated API endpoint for that. If not, and it just links to a webpage, then we can just pull the opening hours from the official website.
In the case of Toverland, when you go to https://www.toverland.com/en/theme-park/opening-times/, behind the scenes it makes an AJAX call to https://www.toverland.com/?type=16635183284&tx_calendar_ajax%5Bdate%5D=2020-12-10&L=3, date
I think is just some date within the week you want the opening hours for.
This returns something like:
{
"current":{
"todayIndex":null,
"timestamp":1607295600,
"date":"2020-12-07"
},
"week":[
...
{
"datetime":1607727600,
"date":{
"current":false,
"full":"2020-12-12",
"day":"12",
"month":"December",
"dayName":"Sa",
"fullDayName":"saturday",
"areaClosedDateString":"These areas are closed on saturday 12 December",
"areaOpenDateString":"These areas are open on saturday 12 December"
},
"time_open":"11:00",
"time_close":"19:00",
...
},
...
],
"header":"The week of 07 until 13 December"
}
I haven't checked what the actual app does, I think if it displays the opening times for the whole park natively then there is probably a dedicated API endpoint for that. If not, and it just links to a webpage, then we can just pull the opening hours from the official website.
The App actually just displays a message like "open today until xx:xx". So there might be a dedicated API endpoint for that.
In the case of Toverland, when you go to https://www.toverland.com/en/theme-park/opening-times/, behind the scenes it makes an AJAX call to https://www.toverland.com/?type=16635183284&tx_calendar_ajax%5Bdate%5D=2020-12-10&L=3,
date
I think is just some date within the week you want the opening hours for.
Looks like a workaround I could implement. Thanks a lot!
Edit: You can even omit the additional parameters and simply GET https://www.toverland.com/?type=16635183284 :-)
As the PR is merged now, I assume this issue can be regarded as resolved and thus closed, right?
Rather than create a new issue, could you implement this yourself with a pull request? --> Yes, but currently have no time to investigate the API, therefore I'm opening up a new park request to gather some information through the community and get the pull request up as fast as possible. 😄
Park Name Toverland, NL
Park Android/iOS/Web Apps https://apps.apple.com/us/app/toverland/id1532381146 https://play.google.com/store/apps/details?id=com.toverland.app
Additional Information Have not yet had the chance to see what servers the app communicates with, but hope to get to do so in the very near future. If anybody else wants to join in or has some details that might be useful for implementing, feel free to use this issue thread. 👍