public ImpersonationToken getImpersonationToken ( Object userIdOrUsername , Integer tokenId ) throws GitLabApiException { if ( tokenId == null ) { throw new RuntimeException ( "tokenId cannot be null" ) ; } Response response = get ( Response . Status . OK , null , "users" , getUserIdOrUsername ( userIdOrUsername ) , "impersonation_tokens" , tokenId ) ; return ( response . readEntity ( ImpersonationToken . class ) ) ; }
Get an impersonation token of a user . Available only for admin users .