Zalo OA icon

Zalo OA

Gửi tin ZBS Template Message qua SĐT, quản lý người dùng OA và token

Token → Refresh Token

AI-generated

Summary

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.

Links

Discussion