I have this script in a SnapChat filter
// @input Asset.RemoteServiceModule remoteServiceModule
var request = global.RemoteApiRequest.create();
request.endpoint = "start"
script.remoteServiceModule.performApiRequest(request, function(response){
if(response.statusCode !== 1){
print("Request Failed with code: " + String(response.statusCode))
return
}
})
but "script.remoteServiceModule" is undefined, so I can't make api request. What can I do to fix this error? I working on Lens Studio 4.55.1 Thanks
You need to add remote media module to your resources (for example import from the Api section of Asset Library) and set it as an input of this script!