refreshToken
abstract suspend fun refreshToken(deviceSerialNumber: String, countryId: CountryId): PreviewModeResult
Requests the OEM's backend to retrieve a new access token using the AVS InstantDeviceRegistration
API. This method is called when the current access token is expired or is about to expire.
Return
PreviewModeResult.Success containing a new PreviewModeToken if the process of refreshing the token was successful or PreviewModeResult.Failure if the process failed.
Parameters
deviceSerialNumber
Unique serial number of this device. The client's backend should be able to recognize each device using this info.
countryId
The country where this device operates.