小编Hit*_*shi的帖子

如何获取skype bot apis的授权令牌?

我想创建一个skype bot,我指的是https://developer.microsoft.com/en-us/skype/bots/docs/api/chat,对于授权,doc指的是https://azure.microsoft.com/en-us/documentation/articles/active-directory-v2-protocols-oauth-code /但是不清楚使用skype bot apis的范围.

那么任何人都可以告诉我如何获取授权令牌来进行skype bot rest api调用.

api skype oauth botframework skype-bots

4
推荐指数
1
解决办法
2222
查看次数

在google drive rest api java中插入文件时的权限异常

我正在尝试使用drive rest api将文件上传到google驱动器,遵循本教程.

对于授权,功能是:

 public static Credential authorize() throws IOException {
    // Load client secrets.
    InputStream in =
        DriveQuickstart.class.getResourceAsStream("client_secret.json");
    GoogleClientSecrets clientSecrets =
        GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));

    // Build flow and trigger user authorization request.
    GoogleAuthorizationCodeFlow flow =
            new GoogleAuthorizationCodeFlow.Builder(
                    HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)
            .setDataStoreFactory(DATA_STORE_FACTORY)
            .setAccessType("offline")
            .build();
    Credential credential = new AuthorizationCodeInstalledApp(
        flow, new LocalServerReceiver()).authorize("user");
    System.out.println(
            "Credentials saved to " + DATA_STORE_DIR.getAbsolutePath());
    return credential;
}
Run Code Online (Sandbox Code Playgroud)

我获取驱动器中所有文件的功能完全正常.

private static void listFiles(Drive service) throws IOException
{
     // Print the names and IDs …
Run Code Online (Sandbox Code Playgroud)

java google-drive-api

0
推荐指数
1
解决办法
1744
查看次数

标签 统计

api ×1

botframework ×1

google-drive-api ×1

java ×1

oauth ×1

skype ×1

skype-bots ×1