POST https://adcel.co/api/app/add

Adding applications by store id or bundle id

Parameters

store_id Example

curl -H "Access-Token: e33e0c9b00fac086da21c46e5ffe997f497b80dc" -H "Client-Id: 5b2e877f-1004-4895-b7db-d869ab7c9d4b" -s -X PUT 'https://adcel.com/api/app/add' -d '{"platform": "ios", "id": "520674307"}'

bundle_id Example

curl -H "Access-Token: e33e0c9b00fac086da21c46e5ffe997f497b80dc" -H "Client-Id: 5b2e877f-1004-4895-b7db-d869ab7c9d4b" -s -X PUT 'https://adcel.com/api/app/add' -d '{"platform": "ios", "bundle_id": "com.app.test"}'

Response

{
"app_id" : "bc4ef93b-9b9d-411b-a802-e86cc0120203",
"app_key" : "bc4ef93b-9b9d-411b-a802-e86cc0120203",
"app_secret" : "*",
"status" : "ok"
}

store_id Example In Java

HttpURLConnection urlConnection = null;
try {
// create connection
URL url = new URL("https://adcel.com/api/app/add");
urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setRequestMethod("PUT");
urlConnection.setRequestProperty("Access-Token", <access token, can be obtained in profile>);
urlConnection.setRequestProperty("Client-Id", <user_uuid, can be obtained in profile>);

urlConnection.setDoOutput(true);
OutputStreamWriter out = new OutputStreamWriter(urlConnection.getOutputStream());
out.write(String.format("{\"platform\":\"%1$s\",\"id\":\"%2$s\"}", <platform>, <store app id >));
out.close();

Log.v("###addApp###", "httpStatus " + urlConnection.getResponseCode());
InputStream in = new BufferedInputStream(urlConnection.getInputStream());

StringBuilder responseText = new StringBuilder();
String inputLine = null;
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
while ((inputLine = reader.readLine()) != null) {
responseText.append(inputLine);
}
reader.close();
Log.v("###addApp###", "httpResponse " + responseText.toString());
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (SocketTimeoutException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (urlConnection != null) {
urlConnection.disconnect();
}
}

bundle_id Example In Java

HttpURLConnection urlConnection = null;
try {
// create connection
URL url = new URL("https://adcel.com/api/app/add");
urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setRequestMethod("PUT");
urlConnection.setRequestProperty("Access-Token", <access token, can be obtained in profile>);
urlConnection.setRequestProperty("Client-Id", <user_uuid, can be obtained in profile>);

urlConnection.setDoOutput(true);
OutputStreamWriter out = new OutputStreamWriter(urlConnection.getOutputStream());
out.write(String.format("{\"platform\":\"%1$s\",\"bundle_id\":\"%2$s\"}", <platform>, <app id>));
out.close();

Log.v("###addApp###", "httpStatus " + urlConnection.getResponseCode());
InputStream in = new BufferedInputStream(urlConnection.getInputStream());

StringBuilder responseText = new StringBuilder();
String inputLine = null;
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
while ((inputLine = reader.readLine()) != null) {
responseText.append(inputLine);
}
reader.close();
Log.v("###addApp###", "httpResponse " + responseText.toString());
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (SocketTimeoutException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (urlConnection != null) {
urlConnection.disconnect();
}
}

Add application by url

parametrs:

url : store url to app

platform: ios | android | tvos | androidtv | roku | firetv | amazon

curl -H "Access-Token: 3c1abaa1da2c7d65255a66ba163cac8930094d76" -H "Client-Id: 9454114b-d8e9-4e08-96df-2f1cb5b64e88" -s 'https://adcel.co/api/app/add' -X PUT -d '{"url":"https://play.google.com/store/apps/details?id=com.graytv.android.wvltnews", "platform":"android"}' | json_pp
{
"app_id" : "2b0fb7fd-442d-4679-9f2d-593e2a9ecdb5",
"app_key" : "2b0fb7fd-442d-4679-9f2d-593e2a9ecdb5",
"app_secret" : "*",
"status" : "ok"
}

Add development application

parametrs:

bundle_id: Bundle id

platform: ios | android | tvos | androidtv | roku | firetv | amazon

dev: 1

$ curl -H "Access-Token: 3c1abaa1da2c7d65255a66ba163cac8930094d76" -H "Client-Id: 9454114b-d8e9-4e08-96df-2f1cb5b64e88" -s 'https://adcel.co/api/app/add' -X PUT -d '{"bundle_id":"com.snapchat.android2", "platform":"android", "dev":1}' | json_pp
{
"app_id" : "bc4ef93b-9b9d-411b-a802-e86cc0120203",
"app_key" : "bc4ef93b-9b9d-411b-a802-e86cc0120203",
"app_secret" : "*",
"status" : "ok"
}
Did this answer your question?