Microsoft Bot Framework User Token API
The User Token API from Microsoft Bot Framework — 5 operation(s) for user token.
The User Token API from Microsoft Bot Framework — 5 operation(s) for user token.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/microsoft-bot-framework:microsoft-bot-framework-user-token-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
version: token
title: Microsoft Bot Token API - V3.1 User Token API
termsOfService: https://www.microsoft.com/en-us/legal/intellectualproperty/copyright/default.aspx
contact:
name: Bot Framework
url: https://botframework.com
email: botframework@microsoft.com
license:
name: The MIT License (MIT)
url: https://opensource.org/licenses/MIT
servers:
- url: https://token.botframework.com
tags:
- name: User Token
paths:
/api/usertoken/GetToken:
get:
tags:
- User Token
operationId: UserToken_GetToken
parameters:
- name: userId
in: query
required: true
schema:
type: string
- name: connectionName
in: query
required: true
schema:
type: string
- name: channelId
in: query
required: false
schema:
type: string
- name: code
in: query
required: false
schema:
type: string
responses:
'200':
description: 'A Token Response object will be returned
'
content:
application/json:
schema:
$ref: '#/components/schemas/TokenResponse'
text/json:
schema:
$ref: '#/components/schemas/TokenResponse'
application/xml:
schema:
$ref: '#/components/schemas/TokenResponse'
text/xml:
schema:
$ref: '#/components/schemas/TokenResponse'
'404':
description: 'Resource was not found
'
content:
application/json:
schema:
$ref: '#/components/schemas/TokenResponse'
text/json:
schema:
$ref: '#/components/schemas/TokenResponse'
application/xml:
schema:
$ref: '#/components/schemas/TokenResponse'
text/xml:
schema:
$ref: '#/components/schemas/TokenResponse'
default:
description: The operation failed and the response is an error object describing the status code and failure.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
text/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
text/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
summary: User token get token
x-summary-source: derived
/api/usertoken/GetAadTokens:
post:
tags:
- User Token
operationId: UserToken_GetAadTokens
parameters:
- name: userId
in: query
required: true
schema:
type: string
- name: connectionName
in: query
required: true
schema:
type: string
- name: channelId
in: query
required: false
schema:
type: string
responses:
'200':
description: An array of key value pairs
content:
application/json:
schema:
type: object
additionalProperties:
$ref: '#/components/schemas/TokenResponse'
text/json:
schema:
type: object
additionalProperties:
$ref: '#/components/schemas/TokenResponse'
application/xml:
schema:
type: object
additionalProperties:
$ref: '#/components/schemas/TokenResponse'
text/xml:
schema:
type: object
additionalProperties:
$ref: '#/components/schemas/TokenResponse'
default:
description: The operation failed and the response is an error object describing the status code and failure.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
text/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
text/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AadResourceUrls'
text/json:
schema:
$ref: '#/components/schemas/AadResourceUrls'
application/xml:
schema:
$ref: '#/components/schemas/AadResourceUrls'
text/xml:
schema:
$ref: '#/components/schemas/AadResourceUrls'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/AadResourceUrls'
required: true
summary: User token get aad tokens
x-summary-source: derived
/api/usertoken/SignOut:
delete:
tags:
- User Token
operationId: UserToken_SignOut
parameters:
- name: userId
in: query
required: true
schema:
type: string
- name: connectionName
in: query
required: false
schema:
type: string
- name: channelId
in: query
required: false
schema:
type: string
responses:
'200':
description: The operation succeeded, there is no response.
content:
application/json:
schema:
$ref: '#/components/schemas/Void'
'204':
description: No Content
default:
description: The operation failed and the response is an error object describing the status code and failure.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
summary: User token sign out
x-summary-source: derived
/api/usertoken/GetTokenStatus:
get:
tags:
- User Token
operationId: UserToken_GetTokenStatus
parameters:
- name: userId
in: query
required: true
schema:
type: string
- name: channelId
in: query
required: false
schema:
type: string
- name: include
in: query
required: false
schema:
type: string
responses:
'200':
description: An array of TokenStatus objects
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/TokenStatus'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/TokenStatus'
application/xml:
schema:
type: array
items:
$ref: '#/components/schemas/TokenStatus'
text/xml:
schema:
type: array
items:
$ref: '#/components/schemas/TokenStatus'
default:
description: The operation failed and the response is an error object describing the status code and failure.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
text/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
text/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
summary: User token get token status
x-summary-source: derived
/api/usertoken/exchange:
post:
tags:
- User Token
operationId: UserToken_ExchangeAsync
parameters:
- name: userId
in: query
required: true
schema:
type: string
- name: connectionName
in: query
required: true
schema:
type: string
- name: channelId
in: query
required: true
schema:
type: string
responses:
'200':
description: 'A Token Response object will be returned
'
content:
application/json:
schema:
$ref: '#/components/schemas/TokenResponse'
text/json:
schema:
$ref: '#/components/schemas/TokenResponse'
application/xml:
schema:
$ref: '#/components/schemas/TokenResponse'
text/xml:
schema:
$ref: '#/components/schemas/TokenResponse'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
text/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
text/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: 'Resource was not found
'
content:
application/json:
schema:
$ref: '#/components/schemas/TokenResponse'
text/json:
schema:
$ref: '#/components/schemas/TokenResponse'
application/xml:
schema:
$ref: '#/components/schemas/TokenResponse'
text/xml:
schema:
$ref: '#/components/schemas/TokenResponse'
default:
description: The operation failed and the response is an error object describing the status code and failure.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
text/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
application/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
text/xml:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TokenExchangeRequest'
text/json:
schema:
$ref: '#/components/schemas/TokenExchangeRequest'
application/xml:
schema:
$ref: '#/components/schemas/TokenExchangeRequest'
text/xml:
schema:
$ref: '#/components/schemas/TokenExchangeRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/TokenExchangeRequest'
required: true
summary: User token exchange async
x-summary-source: derived
components:
schemas:
AadResourceUrls:
type: object
properties:
resourceUrls:
type: array
items:
type: string
TokenResponse:
type: object
properties:
channelId:
type: string
connectionName:
type: string
token:
type: string
expiration:
type: string
InnerHttpError:
type: object
properties:
statusCode:
format: int32
type: integer
body:
type: object
Void:
type: object
properties: {}
TokenExchangeRequest:
type: object
properties:
uri:
type: string
token:
type: string
ErrorResponse:
type: object
properties:
error:
$ref: '#/components/schemas/Error'
TokenStatus:
description: The status of a particular token
type: object
properties:
channelId:
description: The channelId of the token status pertains to
type: string
connectionName:
description: The name of the connection the token status pertains to
type: string
hasToken:
description: True if a token is stored for this ConnectionName
type: boolean
serviceProviderDisplayName:
description: The display name of the service provider for which this Token belongs to
type: string
Error:
type: object
properties:
code:
type: string
message:
type: string
innerHttpError:
$ref: '#/components/schemas/InnerHttpError'
securitySchemes:
bearer_auth:
type: apiKey
description: Access token to authenticate calls to the Bot Connector Service.
name: Authorization
in: header