import com.hellosign.openapi.ApiClient; import com.hellosign.openapi.ApiException; import com.hellosign.openapi.Configuration; import com.hellosign.openapi.api.*; import com.hellosign.openapi.auth.HttpBasicAuth; import com.hellosign.openapi.auth.HttpBearerAuth; import com.hellosign.openapi.model.*; import java.util.ArrayList; import java.util.Arrays; public class Example { public static void main(String[] args) { // Configure HTTP basic authorization: api_key HttpBasicAuth api_key = (HttpBasicAuth) defaultClient .getAuthentication("api_key"); api_key.setUsername("YOUR_API_KEY"); // or, configure Bearer (JWT) authorization: oauth2 /* HttpBearerAuth oauth2 = (HttpBearerAuth) defaultClient .getAuthentication("oauth2"); oauth2.setBearerToken("YOUR_ACCESS_TOKEN"); */ EmbeddedApi api = new EmbeddedApi(defaultClient); EmbeddedEditUrlRequest data = new EmbeddedEditUrlRequest() .ccRoles(Arrays.asList("")) .mergeFields(new ArrayList<>()); String templateId = "5de8179668f2033afac48da1868d0093bf133266"; try { EmbeddedEditUrlResponse result = api.embeddedEditUrl(templateId, data); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AccountApi#accountCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } }