Force Update Authorization Key BX24.refreshAuth
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
BX24.refreshAuth(someCallback: function): object
The BX24.refreshAuth function forcefully updates the authorization key. The handler function someCallback will receive an object similar to BX24.getAuth(). It only works after BX24.init.
Function Parameters
|
Name |
Description |
|
someCallback |
Accepts a function that will be executed upon success |
Example
BX24.init(() => {
const authInfo = BX24.getAuth();
console.log('BX24: current authInfo: ', authInfo);
const button = document.createElement('button');
button.textContent = 'Refresh auth';
button.addEventListener('click', () => {
BX24.refreshAuth((refreshedAuthInfo) => {
console.log('BX24: refreshed authInfo: ', refreshedAuthInfo);
})
});
document.body.appendChild(button);
});
How to Use Examples in Documentation
Continue Learning
- Initialize the BX24.init Library
- Handle the first launch event of the application by the user BX24.install
- Notify about the completion of the installer BX24.installFinish
- Get Data for OAuth 2.0 BX24.getAuth
Copied
Previous