Can I set Tags in trial account?

Comments

4 comments

  • Avatar
    Dmitry Dyudeev

    Hello,

    Actually, there are no such limitations on a trial account. However, as I can see, none of your Tags has any values set. Could you please provide the setTags request you are sending? Most probably, there is some kind of a misprint there.

  • Avatar
    Haruna Nishiwaki

    I ran this script (PHP) :


    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,
    'hwid' => MY_HARDWARE_ID,
    'tags' => array(
    'gameuserid' => 1234,
    )
    )
    );


    Then, response is this:


    Array ( [status_code] => 200 [status_message] => OK [response] => Array ( [skipped] => Array ( )

        )
    

    )


    Next, I ran this:


    pwCall( 'compileFilter', array(
    'auth' => PW_AUTH,
    'devices_filter' => 'A("' . PW_APPLICATION . '") * T("gameuserid", EQ, 1234)'
    )
    );


    Then, response is this:


    Array ( [status_code] => 200 [status_message] => OK [response] => Array ( [devices_count] => 0 )

    )


    Did I mistake usage?

  • Avatar
    Dmitry Dyudeev

    It looks that everything is correct in the request. Could you please provide the HWID you are using in the request? The only thing we can think of is that it's not in our database for some reason. Please note that you can start a support ticket via Contact Us form on our website.

  • Avatar
    Haruna Nishiwaki

    Thanks, I will do so.

Please sign in to leave a comment.