Asterisk (*) not allowed in Status Update

314 Views Asked by At

I'm trying to use the Twitter v1.1 API endpoint:

POST : https://api.twitter.com/1.1/statuses/update.json?status=%2A

-or-

POST : https://api.twitter.com/1.1/statuses/update.json?status=*

After seeing some suggestions about URL Encoding (percent encoding) I'm trying to encode the asterisk (*) character using %2A

Other character encoding works, as expected. But the asterisk character results in the following error:

{ "errors": [{ "code": 32, "message": "Could not authenticate you." }]}

You can reproduce the error using the API Console Tool:

https://dev.twitter.com/rest/tools/console2

For Authentication I chose the Oauth 1 option.

2

There are 2 best solutions below

4
Terence Eden On

It is possible to send a single * as a status update via the API - see https://twitter.com/edent/status/664713007268823040

I suspect that the library you're using isn't properly calculating the OAuth signature. It would help if you showed us the code you use and which library you're relying on.

1
M.Arun pandian On

Just replace the asterisk * with the wide-asterisk . It is perfectly working for me

String tweet_text="Tweet text with asterisk *"; tweet_text= tweet_text.replaceAll("[*]","*");