Handling Toutatice URLs
In the development of applications that interact with the Pronote system, it is important to understand the peculiarities of URLs associated with the Toutatice domain. This note provides a comprehensive explanation of the specific characteristics of Toutatice URLs and offers practical guidance for handling them effectively in real-world applications.
Background
Schools have unique URLs to access their Pronote instances, typically formatted as https://[school-code].index-education.net/
. However, some institutions use an alternative domain, https://[school-code].pronote.toutatice.fr/
, which can lead to confusion and connection issues if not handled correctly.
Identifying Toutatice URLs
Typical Pronote URL Structure
A standard Pronote URL is structured as follows :
https://[school-code].index-education.net/
Toutatice URL Structure
For schools that use the Toutatice domain, the URL structure is :
https://[school-code].pronote.toutatice.fr/
Handling URL Failures
When interacting with Pronote instances, your application might initially attempt to connect using the index-education.net
domain. If this connection fails, it is important to retry using the pronote.toutatice.fr
domain. The following sections outline the steps and code required to handle such cases.
Implementation Example
Below is an example implementation in JavaScript from Papillon, how to handle the URL switch when a connection attempt fails:
Explanation of the Implementation
- Initial Attempt :
The application first attempts to fetch the Pronote instance information using the provided
index-education.net
URL. - Error Handling :
If the initial attempt fails, the
catch
block is executed. - URL Modification :
Within the catch block, the application modifies the URL by replacing the domain
index-education.net
withpronote.toutatice.fr
. - Retry Attempt : The application then retries fetching the Pronote instance information using the modified Toutatice URL.
- Final Error Handling : If the retry attempt also fails, an alert is shown to the user indicating the failure to retrieve Pronote instance information.
Conclusion
Handling Toutatice URLs requires careful consideration of domain differences and robust error handling. By implementing the strategies described in this note, you can ensure seamless connectivity to Pronote instances, regardless of the domain used by the institution. Above all, bear in mind that this is a stage in which testing is omnipresent in order to achieve your goals.