code: public String generateInviteLink(String email) throws OAuthSystemException, OAuthProblemException, URISyntaxException {
  		cleanError();
  		prepareToken();
  
  		OneloginURLConnectionClient httpClient = new OneloginURLConnectionClient();
  		OAuthClient oAuthClient = new OAuthClient(httpClient);
  
  		URIBuilder url = new URIBuilder(settings.getURL(Constants.GENERATE_INVITE_LINK_URL));
  		OAuthClientRequest bearerRequest = new OAuthBearerClientRequest(url.toString())
  			.buildHeaderMessage();
  
  		Map<String, String> headers = getAuthorizedHeader();
  		bearerRequest.setHeaders(headers);
  
  		Map<String, Object> params = new HashMap<String, Object>();
  		params.put("email", email);
  		String body = JSONUtils.buildJSON(params);
  		bearerRequest.setBody(body);
  
  		String urlLink = null;
  		OneloginOAuthJSONResourceResponse oAuthResponse = oAuthClient.resource(bearerRequest, OAuth.HttpMethod.POST, OneloginOAuthJSONResourceResponse.class);
  		if (oAuthResponse.getResponseCode() == 200) {
  			if (oAuthResponse.getType().equals("success")) {
  				if (oAuthResponse.getMessage().equals("Success")) {
  					Object[] objArray = oAuthResponse.getArrayFromData();
  					urlLink = (String)objArray[0];
  				}
  			}
  		} else {
  			error = oAuthResponse.getError();
  			errorDescription = oAuthResponse.getErrorDescription();
  		}
  
  		return urlLink;
  	}
docs: Generates an invite link for a user that you have already created in your OneLogin account.
  
  @param email
  Set to the email address of the user that you want to generate an invite link for.
  
  @return String with the link
  
  @throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnection
  @throws OAuthProblemException - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabled
  @throws URISyntaxException - if there is an error when generating the target URL at the URIBuilder constructor
  
  @see <a target="_blank" href="https://developers.onelogin.com/api-docs/1/invite-links/generate-invite-link">Generate Invite Link documentation</a>