<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.fr.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>14 Oct 2019 10:20:21 Z</lastBuildDate><pubDate>8 Oct 2019 18:21:59 Z</pubDate><description>Bonjour,&#13;
A cause d'un dysfonctionnement sur la gestion des contacts google avec les fonctions windev (le nom du contact n'est pas renseigné lorsqu'on ajoute un contact) je souhaite utiliser l'api people. Je rencontre cependant un problème&#13;
Je récupère bien mon token avec la fonction AuthIdentifie, par contre lorsque je lance ma requête http pour ajouter mon contact j'ai une erreur 403 ("Request had insufficient authentication scopes."). A priori il me manque le scope "https://www.googleapis.com/auth/contacts". &#13;
Je ne vois pas où je peux l'ajouter. Quelqu'un peut-il m'aider ?&#13;
&#13;
Le code que j'utilise :&#13;
&#13;
[code:wl]&#13;
toto est un OAuth2Paramètres&#13;
&#13;
toto..ClientID="monidclientgoogle"&#13;
toto..ClientSecret="monclientsecretgoogle"&#13;
toto..URLAuth="https://accounts.google.com/o/oauth2/auth"&#13;
toto..URLRedirection="http://localhost:15000"&#13;
toto..URLToken="https://oauth2.googleapis.com/token"&#13;
toto..Scope="profile email"&#13;
MonToken est un AuthToken = AuthIdentifie(toto)&#13;
SI ErreurDétectée ALORS&#13;
	Erreur(ErreurInfo)&#13;
FIN&#13;
&#13;
req est un httpRequête&#13;
req..Méthode = httpPost&#13;
//req..AuthToken = MonToken // Token d'authentification&#13;
req..ContentType = "application/json"&#13;
req.URL="https://people.googleapis.com/v1/people:createContact"&#13;
req.Entête["Authorization"]="Bearer "+MonToken.Valeur&#13;
&#13;
j est un JSON&#13;
&#13;
j.addresses[1].streetAddress= "monadresse"&#13;
j.addresses[1].city= "maville"&#13;
j.addresses[1].postalCode="moncodepostal"&#13;
j.addresses[1].type= "work"&#13;
j.names[1].familyName="monnom"&#13;
j.names[1].givenName= "monprenom"&#13;
j.phoneNumbers[1].value="montelephone"&#13;
j.phoneNumbers[1].type= "work"&#13;
j.phoneNumbers[2].value="monmobile"&#13;
j.phoneNumbers[2].type="mobile"&#13;
j.emailAddresses[1].value= "monemail.com"&#13;
j.emailAddresses[1].type= "work"&#13;
req.Contenu=j&#13;
réponseHTTP est un httpRéponse = HTTPEnvoie(req)&#13;
[/code]&#13;
&#13;
Merci.</description><ttl>30</ttl><generator>WEBDEV</generator><language>fr_FR</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/233533-contact-google-via-api-people/read.awp</link><title>Contact Google via l'API People</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>Alain BLAIZEAU</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/233533-contact-google-via-api-people-233648/read.awp</comments><pubDate>14 Oct 2019 10:20:21 Z</pubDate><description>Bonjour,&#13;
&#13;
Tu as essayé &#13;
toto..Scope="contacts" ?</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/233533-contact-google-via-api-people-233648/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/233533-contact-google-via-api-people-233648/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/233533-contact-google-via-api-people/read.awp">Contact Google via l'API People</source><title>Re: Contact Google via l'API People</title></item></channel></rss>
