GetNewAccessToken

Required for: iOS Android
POST /wopibootstrapper

The GetNewAccessToken operation is used to retrieve a fresh WOPI access token for a given resource (i.e. a file or container), provided the caller has a valid OAuth 2.0 token.

This operation is called by OAuth-capable WOPI clients, such as Office for iOS, to refresh WOPI access tokens when they expire.

Request Headers:
 
Response Headers:
 
Status Codes:

Response

The response to a GetNewAccessToken call is JSON (as specified in RFC 4627) containing the following required properties:

Bootstrap

The contents of this property should be the response to a Bootstrap call.

AccessTokenInfo

The contents of this property should be a the nested JSON-formatted object with the following properties.

AccessToken
A string access token for the file specified in the X-WOPI-WopiSrc request header.
AccessTokenExpiry
A long value representing the time that the access token provided in the response will expire. See access_token_ttl for more information on how this value is defined.

Sample response

{
  "Bootstrap": {
    "EcosystemUrl": "http://.../wopi*/ecosystem?access_token=<ecosystem_token>",
    "UserId": "User ID",
    "SignInName": "user@contoso.com",
    "UserFriendlyName": "User Name"
  },
  "AccessTokenInfo": {
    "AccessToken": "1234567890abcdef",
    "AccessTokenExpiry": 1234567890
  }
}