gmail - When Service Account should be used to access google api? -
i trying use google api getting new emails gmail account. reading docs found there 2 types access api first 1 without authorization (with json credential) , second 1 one service account (with p12 certificate , secretkey)
can not understand difference between access? should use?
thanks
oauth2 first type looking at. oauth2 consent screen displayed user must approve access. usage want access users gmail account, want access users google calendar, want access users google drive.
with service account access pre-authorized taking service account email address , adding user data in question. usage: want allow other users upload files google drive account, add service account email address folder on google drive service account able upload folder out having prompt user permissions.
use oauth2 when want access users account, use service account when want access account controlled developer.
if want access users gmail account need use oauth2 cant grant user access gmail there no way give service account access it.
Comments
Post a Comment