Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8905763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:28:33+00:00 2026-06-15T02:28:33+00:00

I am not a professional programmer. I manage with PHP and Javascript, but I

  • 0

I am not a professional programmer. I manage with PHP and Javascript, but I am having a hard time converting Pushwoosh methods to functional PHP or Javascript. This is the method that I need help converting:

Method /setTags

Set tags values for device

Request:

{
  "request":{
    "application":"DEAD0-BEEF0",
    "hwid": 'device hardware id',
    "tags": {
      "tag1": "string value",
      "tag2": 42,
      "tag3": "string",
      "tag4": 3.14
    }
  }
}

This is how they post their methods. Any help with this?

I wrote a PHP to setTags but I could not verify it yet as I am still working on retrieving the Token. I have a question on that on this link:

Phonegap/Pushwoosh Android retrieving Device id / Token

this is my PHP for setTags. Does this look right using JSON? (I am running late on my project!)

<?php

define('PW_AUTH', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
define('PW_APPLICATION', 'xxxxxxxxxx');
define('HW_ID', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');

function doPostRequest($url, $data, $optional_headers = null) {
    $params = array(
        'http' => array(
            'method' => 'POST',
            'content' => $data
        ));
    if ($optional_headers !== null)
        $params['http']['header'] = $optional_headers;

    $ctx = stream_context_create($params);
    $fp = fopen($url, 'rb', false, $ctx);
    if (!$fp)
        throw new Exception("Problem with $url, $php_errmsg");

    $response = @stream_get_contents($fp);
    if ($response === false)
        return false;
    return $response;
}

function pwCall( $action, $data = array() ) {
    $url = 'https://cp.pushwoosh.com/json/1.3/' . $action;
    $json = json_encode( array( 'request' => $data ) );
    $res = doPostRequest( $url, $json, 'Content-Type: application/json' );
    print_r( @json_decode( $res, true ) );
}

pwCall( 'setTags', array(
    'application' => PW_APPLICATION,
    'auth' => PW_AUTH,
    'hwid' => HW_ID,
    'tags' => array(
                array(
                    'tag1' => 'string value',
                    'tag2' => 42,
                    'tag3' => 'string',
                    'tag4' => 3.14
                )
            )
        )
    );

?>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:28:34+00:00Added an answer on June 15, 2026 at 2:28 am

    you do not need to convert this JSON to send tags to Pushwoosh. It’s being sent directly from the device to the Pushwoosh server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not professional Java programmer, so this question could be simple, but I have
I am not professional programmer so i can not be sure about this.How many
First, let me say I'm not a professional programmer, but an engineer who had
I am not a professional programmer (my area is medical research), but I am
I'm not a professional, but I'm messing around with wordpress trying to customize it
I'm not a professional programmer, so please don't hesitate to state the obvious. My
What makes you professional PHP programmer? When you know OOP, smarty, framework. I guess
I'm not a programmer, but I developed a small company website in Visual Studio.
I am not a professional programmer, I am more on the business side and
I'm not a hardcore programmer, but I did develop a company website using MS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.