I have a scenario which application will send an email address and expecting user information in return including space id/name.
the name space/id will be use as identifier to send back other information on that particular user.
I know by using service account is possible to retrieved space name/id but is there any api can use to retrieve space name/id by using email address.
this is example get name space/id
kindly share method/google api that can be use.
Here is sample nodejs code and it will return members object:
var endpoint = 'https://chat.googleapis.com/v1/spaces/*****/members'
var options = {
method: 'GET',
json: true,
uri: endpoint,
headers:{
"Accept": "application/json",
"Content-type":"application/json",
"Authorization":"Bearer "+accessToken
}
request(options, function(err, res, body) {
console.log(body);});
Note: Do not have G suite account.