code: public DefaultOAuth2AccessToken retrieveToken(Map<String, Object> formParams, String authorization) throws AuthenticationApiException {
          Headers.Builder headerBuilder = new Headers.Builder();
          headerBuilder.add("Accept", "*/*");
          headerBuilder.add("Content-Type", "application/x-www-form-urlencoded");
          if (authorization != null) {
              headerBuilder.add("Authorization", authorization);
          }
          Request request = new Request.Builder()
                  .url(client.getBasePath() + "/oauth/token")
                  .headers(headerBuilder.build())
                  .post(client.buildRequestBodyFormEncoding(formParams))
                  .build();
          Call call = client.getHttpClient().newCall(request);
          Type returnType = new TypeToken<DefaultOAuth2AccessToken>() {
          }.getType();
          try {
              ApiResponse<DefaultOAuth2AccessToken> resp = client.execute(call, returnType);
              return resp.getData();
          } catch (ApiException e) {
              throw new AuthenticationApiException("Authorization error", e);
          }
      }
docs: Retrieve access token
  Retrieve an access token based on the grant type &amp;mdash; Authorization Code Grant, Resource Owner Password Credentials Grant or Client Credentials Grant. For more information, see [Token Endpoint](https://tools.ietf.org/html/rfc6749). **Note:** For the optional **scope** parameter, the Authentication API supports only the &#x60;*&#x60; value.
  
  @param formParams    The form parameters, can be created via static methods
  @param authorization Basic authorization. For example: &#39;Authorization: Basic Y3...MQ&#x3D;&#x3D;&#39; (optional)
  @return DefaultOAuth2AccessToken
  @throws AuthenticationApiException if the call is unsuccessful.