search

checkJSAPI

Use Case

This API allows to check if any inbuilt bridge is available or not before using it in the application.

Request Attributes

Content format: JSON

ParameterDescriptionRequiredExample Value
apithe name of any of the inbuilt bridgesYestoast

Response Attributes

Success:

ParameterDescriptionExample Value
availableBooleantrue

Error Responses:

ParameterDescriptionExample Value
errorError2
messageError messageInvalid parameter

ERROR CODES

codeDescription
2Invalid parameter
REQUEST CODE
RESPONSE CODE
JAVASCRIPT
copy content icon
const requestObject={
   api: 'toast' // put the name of any of the 
inbuilt bridges
}

JSBridge.call('checkJSAPI',requestObject,
 function(result) {
  console.log(JSON.stringify(result))
});