Documentation

BX24.getAuth

Boolean|Object BX24.getAuth()

Retrieves data for authentication using OAuth 2.0. Returns an object in the following format:

{access_token: authentication_code, expires_in: code_expiration_date, refresh_token: authentication_renew_token, domain: current_domain, member_id: Intranet_ID}

The expiration date is returned as the Date object.

This function returns valid data only after BX24.init is called. Otherwise, it will return false.

When the ID expires, the new one is generated automatically when calling BX24.callMethod or BX24.refreshAuth.

Example

console.log(BX24.getAuth()); 


© «Bitrix24», 2001-2024
Up