Bonjour, je suis commerçant et affilié à l'organisme gestionnaire des titres restaurants.
J'ai donc accès à ce portail via mon code affilié et un mot de passe : https://www.crt.asso.fr/NEA/Account/...nUrl=%2fNEA%2f
Une fois logué je peux vérifier si un titre restaurant est bien valable (carnet non volé...) en saisissant le numéro du titre en question.
En inspectant la requête, il s'agit d'un POST
J'aimerais pouvoir automatiser cette tâche directement depuis Excel mais après plusieurs recherches je patauge un peu. En effet l'authentification n'est pas simple à coder pour ma part.
Votre aide est la bienvenue.
Voici le descriptif de la requête sous Chrome (j'ai anonymisé les informations personnelles de connexion)
General
Request URL:https://www.crt.asso.fr/NEA/Account/...nUrl=%2FNEA%2F
Request Method:POST
Status Code:302 Found
Response Headers
Cache-Control:max-age=0, no-cache, no-store, must-revalidate
Connection:Keep-Alive
Content-Length:122
Content-Type:text/html; charset=utf-8
Date:Fri, 10 Mar 2017 12:42:01 GMT
Expires:Wed, 11 Jan 1984 05:00:00 GMT
Keep-Alive:timeout=5, max=99
Location:/NEA/
Pragma:no-cache
Server:Microsoft-IIS/7.5
Set-Cookie:.ASPXAUTH=0B9A76034C6659905F9D6B4F1881D6DA51889592443; path=/
X-AspNet-Version:4.0.30319
X-AspNetMvc-Version:4.0
X-Content-Type-Options:nosniff
X-Frame-Options:sameorigin
X-Powered-By:ASP.NET
Remote Address:81.255.195.114:443
Request Headers
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate, br
Accept-Language:fr-FR,fr;q=0.8
Cache-Control:max-age=0
Connection:keep-alive
Content-Length:205
Content-Type:application/x-www-form-urlencoded
Cookie:ASP.NET_SessionId=k1ixtazl1a1gu; __RequestVerificationToken_L05FQQ2=6qV_EElO1LcuuIxun2_cnZb54TZJe-pbVjG0VnLkmjdE88hNWXL-k3c4PY89uP7STiP8j7USwPN57wIzqjQggRSJINz9SqXDh7FQwwW2GLSgXAg2; __utma=191880309.452072024.1488573681.1489145502.1489148060.3; __utmb=191880309.9.10.1489148060; __utmc=191880309; __utmz=191880309.1488573681.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); fe_typo_user=758ccd26892baf680fd9fb0560abb767
Host:www.crt.asso.fr
Origin:https://www.crt.asso.fr
Referer:https://www.crt.asso.fr/NEA/Account/...nUrl=%2fNEA%2f
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Query String Parameters
returnUrl:/NEA/
Form Data
__RequestVerificationToken:iFUBQb5dMsakBQAgHdELh0VOb
codeAffilie:XXXXXX
key:X
password:XXXX
Partager