package com.wecloud.im.sdk.sample;

import com.alibaba.fastjson.JSONObject;
import com.wecloud.im.sdk.WecloudIm;
import com.wecloud.im.sdk.WecloudImClientBuilder;
import com.wecloud.im.sdk.model.Token;

/**
 *
 * @Author luozh
 * @Date 2022年04月18日 13:38
 * @Version 1.0
 */
public class GetTokenSample {

    public static void main(String[] args) {
        WecloudIm im = new WecloudImClientBuilder().build("http://127.0.0.1:8082",
                "QizKVHcILRWp6Td2",
                "287d04828099fb7de871e9dda845fa8b6b2302faf2ab3737");

        Long userId = 20220413001L;
        Integer deviceType = 1;
        Token token = im.getToken(userId, deviceType);
        System.out.println("\t get token result=" + JSONObject.toJSONString(token));
    }
}
