以编程方式为VSTS生成个人访问令牌 [英] Programmatically Generate Personal Access Token for VSTS

查看:52
本文介绍了以编程方式为VSTS生成个人访问令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在我可以连接的VSTS REST端点,以便用户自己为另一个PAT自助服务?理想情况是,在当前日期到期前几天.我有一个时间表应用程序,现在正在连接到VSTS以获取Workitem信息并更新所说的Workitem.但是,在某些时候(90天,180天或一年后),PAT将会过期.我希望他们不必离开应用程序来生成一个新的应用程序,并在每个间隔将其保存在我的应用程序中.我希望他们只需单击一个按钮,即可从我的应用中再次生成该按钮.可以肯定地知道,我将使用其当前的PAT连接到REST端点.

Is there are VSTS REST endpoint I can connect to in order to let a user self-serve themselves another PAT? Ideally a few days before their current one expires. I have a time sheet application that is now connecting to VSTS to get Workitem information and to update said Workitem. However, at some point (90 days, 180 days or a year later) the PAT will expire. I would rather them not have to leave the application to generate a new one and save it in my application at each interval. I would love for them to just click a button to generate it again from my app. It would be secure seeing that I would connect to the REST endpoint with their current PAT.

推荐答案

没有官方API可以通过编程方式获取个人访问令牌.

There isn’t official API to get Personal Access Token programmatically.

您可以考虑使用OAuth:授权使用OAuth 2.0访问REST API

You may consider OAuth: Authorize access to REST APIs with OAuth 2.0

这篇关于以编程方式为VSTS生成个人访问令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆