How to identify webhook subscribed user from the response payload


I have subscribed two users for a webhook url. I had mentioned one user in another user’s tweet and got same response payload for two times from twitter. How do I identify the user to whom the response has been received.

Here I have attached response for your reference

"created_at":"Tue Apr 10 05:08:57 +0000 2018",
"text":"@Sample2511 mention tweet 2",
"source":"\u003ca href=\"http:\/\/\" rel=\"nofollow\"\u003eTwitter Web Client\u003c\/a\u003e",
"name":"Amsaveni Rajasekar",
"created_at":"Tue Mar 13 06:19:18 +0000 2018",

Thanks in advance



Can you help me with registering webhook url, Twitter staff is not helping any more.

I am getting an error while registering url:

    "errors": [
            "code": 261,
            "message": "Application cannot perform write actions. Contact Twitter Platform Operations through"

I tried all the possible solutions but didn’t get sort out this.

Thank in advanced


@Sample2511 Thanks for the reply

My application has below permissions

Read, Write and Access direct messages

I also get Account activity approval email from twitter to user Beta application.

But still get same error

My webhook url is below:


env_name should be like this(env-beta) in your webhook url

not (:env-beta)


Used above url but still getting same error.

I am using php to perform this. code is below, please let me know where I am doing mistake.

$url =  urlencode('');
$webhooksUrl = '' . $url;
$token = 'my_access_token';
$headers = array(
	'authorization: Bearer ' . $token,
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, $webhooksUrl); 
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); 
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER,$headers);
$result  = curl_exec($ch); 
echo '<pre>';print_r($result);exit;


I am using app-user auth instead of app-only oauth and it’s working fine for me
check this link for your reference


How do I get app-user auth using api?


use the following information in the header along with Content-Type and Content-Length

requestHeader = "OAuth " + "oauth_consumer_key=\"" + URLEncoder.encode(consumerKey, "UTF-8") + "\"" + ", oauth_nonce=\"" + URLEncoder.encode(String.valueOf(millis), "UTF-8") + "\"" + ", oauth_signature=\"" + URLEncoder.encode(signature, "UTF-8") + "\"" + ", oauth_signature_method=\"" + URLEncoder.encode("HMAC-SHA1", "UTF-8") + "\"" + ", oauth_timestamp=\"" + URLEncoder.encode(String.valueOf(time), "UTF-8") + "\"" + ",oauth_token=\"" + URLEncoder.encode(oauthToken, "UTF-8") + "\"" + ", oauth_version=\"" + URLEncoder.encode("1.0", "UTF-8") + "\"";



Can you send in the php format, Its look like very complex perameters

Thank you


how can i get tweet_create_events ?


Have you checked out our documentation?