ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Issues with Cordova SDK 2.0


Article ID: 145600


Updated On:


CA Mobile API Gateway CA Rapid App Security


For a mobile application, the customer's developers experience some issues with Cordova SDK 2.0, on Android and iOS.

Mobile app is using SDK in order to register device/login.

Although standard API calls are working through SDK, they can't seem to be able to handle attachments, whether download or upload, as it gives an error with multi-part boundaries which are not found.

As an interim process, they want to use plain REST API calls instead of using methods from SDK. Problem is that we need to have access to Oauth2 refresh_token, and it would seem only getAccessToken() function exists. Is there a solution for this ?



Release : 4.2

Component : MOBILE API


We have attached sample code just showing how to do a post multi-part request. We have used a plugin to choose files in our sample named "Cordova-plugin-chooser"

For iOS :

iOS only supports base64 data as input. So please convert image to base64 string and send it as fileData parameter
For Android :

It supports path and base64. But right now path has a bug which will eventually be fixed. So please convert image to base64 string and send it as fileData parameter

For Download :

SDK Does not support binary data/file to be downloaded. Please use JSON and have the base64 string of image as one of the values in JSON and try to hit the APIs


1582288415643__Sample-Code (1).html get_app