All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dingtalk.spring.boot.DingTalkUserOperations Maven / Gradle / Ivy

There is a newer version: 2.7.x.20240823.RELEASE
Show newest version
package com.dingtalk.spring.boot;

import com.dingtalk.api.DefaultDingTalkClient;
import com.dingtalk.api.DingTalkClient;
import com.dingtalk.api.request.*;
import com.dingtalk.api.response.*;
import com.taobao.api.ApiException;
import lombok.extern.slf4j.Slf4j;

/**
 * 
    *
  • * 1、企业内部应用免登: * https://open.dingtalk.com/document/orgapp-server/enterprise-internal-application-logon-free *
  • *
  • * 2、第三方企业应用免登: * https://open.dingtalk.com/document/orgapp-server/third-party-enterprise-application-logon-free *
  • *
  • * 3、应用管理后台免登: * https://open.dingtalk.com/document/orgapp-server/log-on-site-application-management-backend *
*/ @Slf4j public class DingTalkUserOperations extends DingTalkOperations { public DingTalkUserOperations(DingTalkTemplate template) { super(template); } /** * @param code code * @param accessToken 应用的accessToken * @return the OapiUserGetuserinfoResponse * @throws ApiException if Api request Exception */ public OapiUserGetuserinfoResponse getUserinfoByCode(String code, String accessToken) throws ApiException { DingTalkClient client = new DefaultDingTalkClient(PREFIX + "user/getuserinfo"); OapiUserGetuserinfoRequest request = new OapiUserGetuserinfoRequest(); request.setCode(code); return client.execute(request, accessToken); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy