code: public static Map<String, Object> createFormParamAuthCodeGrantType(String redirectUri, String code, String clientId) {
          if (redirectUri == null) {
              throw new IllegalArgumentException("Missing the required parameter 'redirect_uri'");
          }
          if (code == null) {
              throw new IllegalArgumentException("Missing the required parameter 'code'");
          }
          Map<String, Object> formParams = new HashMap<>();
          formParams.put("grant_type", "authorization_code");
          formParams.put("redirect_uri", redirectUri);
          formParams.put("code", code);
          if (clientId != null) {
              formParams.put("client_id", clientId);
          }
          return formParams;
      }
docs: Build form parameters
  
  @param redirectUri Uri to redirect
  @param code        See [Authorization code](https://tools.ietf.org/html/rfc6749#section-1.3.1) for details.
  @param clientId    The ID of the application or service that is registered as the client. You&#39;ll need to get this value from your PureEngage Cloud representative. (optional)
  @return a map of form parameters
  @throws IllegalArgumentException if required form parameters are missed