Embedding Documentation
Refreshing Expired Token
Learn how to refresh expired embed tokens for your agent’s continuous operation
Overview
This documentation explains how to refresh expired tokens for your embedded Vocera agents to maintain uninterrupted service.
Base URL
Authentication Endpoint
Refresh Token
This endpoint generates a new access token using your refresh token when the current access token expires.
Request Headers
Header | Description |
---|---|
Content-Type | application/json |
Request Body
Parameters
refresh
(string, required): Your valid refresh token obtained from the initial token generation
Response
A successful request will return a new access token for continued agent embedding.
Success Response Example
Response Fields
access
(string): New JWT access token for embedding the agent
Error Responses
Status Code | Description |
---|---|
400 | Invalid request parameters |
401 | Invalid or expired refresh token |
403 | Unauthorized access |
500 | Internal server error |
Implementation Steps
- Monitor your access token’s expiration
- Before the access token expires, use your refresh token to request a new one
- Update your application with the new access token
- Continue using the agent embed widget with the new token
Token Lifecycle
- Access tokens expire after 24 hours (1 day)
- Refresh tokens have a longer lifetime than access tokens
- If the refresh token expires, you’ll need to generate new tokens using the initial token generation endpoint
- Implement proper error handling for failed refresh attempts
Security Considerations
- Store refresh tokens securely
- Use HTTPS for all API calls
- Implement proper error handling
- Clear all tokens when removing the agent embed
- Never expose tokens in client-side code