DEVELOPER CENTER
...
Libraries
$pinc.oauth
Methods
7min
$pinc oauth authorized() $pinc oauth authorizedlist() $pinc oauth processcommand() $pinc oauth bind() $pinc oauth client connections() $pinc oauth client display() $pinc oauth revoke() authorized(provider, \[userid], callback) allows you to query whether the user has previously authorized an integration user this interface when you wish to query the authorization status for a single provider arguments argument description provider internal provider name see provider reference docid\ z26cdo6omb40w2fymu ut userid optional defaults to the data user id docid\ six7fj9iqb5z2gv aa96r attribute in the script tag callback javascript callback example function checkauthorized(){ 	 var provider = "googlemail"; 	 var userid = "user\@myapp com" 	 $pinc oauth authorized(provider, userid, (authorized)=>{ 	 console log(authorized); 	 }) 	} authorizedlist(userid, callback) gives you a list of providers that the user has authorized example function checkauthorized(){ 	 var userid = "user\@myapp com" 	 //set the userid to null if you want it to default 	 $pinc oauth authorizedlist(userid, (providerlist)=>{ 	 //array providerlist 	 console log (providerlist) 	 }) 	} processcommand(json params) inititates the oauth authorization process for the given provider ensure that this method is called synchronously on user interaction (onclick etc ) an asynchronous call to this function will block any authorizations that work with popups param description provider internal provider name see provider reference docid\ z26cdo6omb40w2fymu ut user id optional defaults to the data user id docid\ six7fj9iqb5z2gv aa96r attribute in the script tag example function clickhandler(){ / optional user id if you want to override the data user id specified in the script tag / var commandparams = { "provider" "googlecalendar", "user id" " " }; $pinc oauth processcommand(commandparams) } bind(div) pass the div element for scenarios where the div is dynamically added to the page using javascript of shadow dom function laterender(eldiv){ / ensure that the dom element being passed has the folowing attributes \<div data oauth ui="list columns/list/list panel" data oauth ui switches="statuson,disconnect" data oauth icon size="medium/large" data oauth button color="#007bff" data oauth ui providers="googlecalendar,msgraphcalendar, " data oauth ui providertypes="">\</div> / $pinc oauth bind(eldiv); } revoke(provider,userid) invokes the token revocation for the current user if the provider does no offer api based revocation then the tokens are deleted from the pathfix databases/caches example function revoke(){ $pinc events on("$pinc oauth","revoked",data=>{console log(data)}) $pinc oauth revoke("googlecalendar"); } provider reference docid\ z26cdo6omb40w2fymu ut