Actions7
- Hội Thoại (Conversation) Actions
- Người Dùng (OA) Actions
- Thông Tin OA Actions
- Tin Tư Vấn (CS Message) Actions
- Token Actions
Token → Refresh Token
AI-generatedSummary
Refresh the stored Zalo OAuth access token using its refresh token and persist the new tokens to the workflow credential.
Inputs
- resource — Resource type; must be set to 'token' for this operation.
- operation — Operation to perform; select 'Refresh Token' when resource is 'token'.
Output shape
a single JSON object with success (boolean), access_token (string), refresh_token (string), credentialUpdated (boolean), and message (string)
When a credential ID and instance URL are configured, the new tokens are written back to the credential; otherwise only the tokens are returned.
Examples
Example 1: Refresh token using stored credentials
Resource=token, Operation=Refresh Token; workflow automatically uses saved appId, secretKey, refreshToken, and updates credential with new tokens.
Example 2: Handle token expiration error
Same as above; if response error indicates token expired, re‑run Refresh Token to obtain a fresh access token.
Example 3: Refresh token without automatic update
Set Resource=token, Operation=Refresh Token but omit n8nInstanceUrl, n8nApiKey, or credentialId; the node returns new tokens without persisting them.