Hi All,
I want to keep track of the admin team member ID of the person who invite or remove the new user for the team. If I got the event and I can print it as:
{
"timestamp" : "2022-11-03T17:17:51Z",
"event_category" : "members",
"event_type" : {
".tag" : "member_change_status",
"description" : "Changed member status (invited, joined, suspended, etc.)"
},
"details" : {
".tag" : "member_change_status_details",
"new_value" : "invited",
"previous_value" : "not_joined"
},
"actor" : {
".tag" : "admin",
"admin" : {
".tag" : "team_member",
"account_id" : "admin_account_idxxxxxxxxxxxxxxxxx",
"display_name" : "TestAdmin",
"email" : "testAdmin@test.com",
"team_member_id" : "admin_team_member_idxxxxxxxxxxxxx"
}
},
"origin" : {
"access_method" : {
".tag" : "end_user",
"end_user" : {
".tag" : "web",
"session_id" : "session_idxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
},
"geo_location" : {
"ip_address" : "0.0.0.",
"city" : "",
"region" : "",
"country" : ""
}
},
"involve_non_team_member" : false,
"context" : {
".tag" : "team_member",
".tag" : "team_member",
"account_id" : "team_member_account_idxxxxxxxxxxxxxxxxxxx",
"display_name" : "",
"email" : "testTeamMember@test.com",
"team_member_id" : "team_team_member_idxxxxxxxxxxxxxxxxxxxxxxx"
},
"participants" : [ ],
"assets" : [ ]
}
I want to get the team_member_id of the admin which is the value: "admin_team_member_idxxxxxxxxxxxxx". However when I tried to get to the Actor object using the function call:
TeamEvent event = events.get(i);
String adminTeamMemberId = event.getActor().getAdminValue().....
I got the error:
Exception in thread "main" java.lang.IllegalStateException: Invalid tag: required Tag.ADMIN, but was Tag.APP
at com.dropbox.core.v2.teamlog.ActorLogInfo.getAdminValue(ActorLogInfo.java:241)
In addition, the object that is returned from the event.getActor().getAdminValue() does not have the get method to the the team_member_id value. I would like to get that value. What should I do?
Thank you.