I need to know which user is connected with the organization via OAuth2.0 .I noticed in the xero developer site it contains some information but not clear enough. Is there anyone who is having python code written for this.
Reason : Currently I am getting all the organisation informations from the API connection.I need to filter the content of these output based on the user type who is connected(Ex: Manager).So for that I need to know which user(user email address) is connected with Oauth2.0
To find out the email address of the authorizing user you need to ask for the openid profile email
scopes during authorization. You will then receive an id token back (along with the access and refresh token) which you can decode to get the user's name and email address.
Any OpenID Connect library will allow you to do this.