Erreur AuthSub Youtube API
Publié le Jeudi 20 Mars 2008
Lors de la connexion d'authentification Youtube AuthSub, ce message peut être rencontré :
La page de mandée ne peut pas être affichée.
Un autre site a demandé l'accès à votre compte Google, mais a envoyé une demande incorrecte.
Veuillez contacter le site que vous avez tenté d'utiliser lorsque vous avez reçu ce message pour l'informer de l'erreur.
Ce problème peut être du à des paramètres mal transmis.
Par exemple si l'Url n'est pas correctement encodée, ou si des caractères HTML se sont perdus.
Le cas le plus fréquent est le signe "&", veuillez à décoder la chaine HTML afin de ne garder que les caractères bruts.
Voici un extrait de la documentation de l'API : dispo ici : http://code.google.com/intl/fr/apis/youtube/2.0/reference.html#urlEscaping
URL Escaping
To make an HTTP search request, you must follow certain conventions so that Google can correctly translate your HTTP request and generate an appropriate response.
The HTTP URL schema specifies that an HTTP URL request may only contain certain characters:
- Alphanumeric characters: [a-z][A-Z][0-9]
- Special characters: $ - _ . | + ! * ' ( )
- Reserved characters: ; / ? : @ = & %
Google uses reserved characters to decode URLs and uses some special characters to request search features. Consequently, you should URL escape all nonalphanumeric characters that occur in search parameter values.
To URL escape a string, convert each sequence of whitespace characters to a single "+" (plus sign) and replace any other nonalphanumeric characters with the hexadecimal encoding that represents the value of that character. The hexadecimal encodings for the special and reserved characters listed above are shown in the following table. Each of these characters should be URL escaped in request parameter values.
| Character | Hexadecimal Encoding |
|---|---|
| $ | %24 |
| - | %2D |
| _ | %5F |
| . | %2E |
| + | %2B |
| ! | %21 |
| * | %2A |
| % | %25 |
| " | %22 |
| ' | %27 |
| ( | %28 |
| ) | %29 |
| ; | %3B |
| / | %2F |
| ? | %3F |
| : | %3A |
| @ | %40 |
| = | %3D |
| & | %26 |
| | | %7C |
Examples
| Original String | URL Escaped String |
|---|---|
| punch&judy | punch%26judy |
| O'Reilly | O%27Reilly |
You can find additional information on URL escaping at RFC 2396 and W3C.


Publier un commentaire
Les commentaires seront soumis à l'administrateur du site pour vérification. Celui-ci se réservera le droit de supprimer les publications non conformes qui ne respectent pas les règles.