TwitterException: 401:Authentication credentials were missing or incorrect

Hi Community,
I researched for a few days now to find the solution myself but actually didn’t succeed:
When trying to authenticate openHAB against Twitter, the following error is printed to the log, a few seconds after the URL was printed to the log.

The machine is running openhab 1.7.1installed with apt-get

[ERROR] [o.o.a.t.i.TwitterActionService] - Failed to authenticate openHAB against Twitter
twitter4j.TwitterException: 401:Authentication credentials ( were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the system clock is in sync.
Error processing your OAuth request: Invalid oauth_verifier parameter

	at twitter4j.internal.http.HttpClientImpl.request( ~[twitter4j-core-3.0.5.jar:3.0.5]
	at twitter4j.internal.http.HttpClientWrapper.request( ~[twitter4j-core-3.0.5.jar:3.0.5]
	at ~[twitter4j-core-3.0.5.jar:3.0.5]
	at twitter4j.auth.OAuthAuthorization.getOAuthAccessToken( ~[twitter4j-core-3.0.5.jar:3.0.5]
	at twitter4j.auth.OAuthAuthorization.getOAuthAccessToken( ~[twitter4j-core-3.0.5.jar:3.0.5]
	at twitter4j.TwitterBaseImpl.getOAuthAccessToken( ~[twitter4j-core-3.0.5.jar:3.0.5]
	at org.openhab.action.twitter.internal.TwitterActionService.getAccessToken( [bundlefile:na]
	at org.openhab.action.twitter.internal.TwitterActionService.start( [bundlefile:na]
	at org.openhab.action.twitter.internal.TwitterActionService.updated( [bundlefile:na]
	at$ [org.eclipse.equinox.cm_1.0.400.v20120522-1841.jar:na]
	at$ [org.eclipse.equinox.cm_1.0.400.v20120522-1841.jar:na]

Any Advices on how to get Twitter authenticated or hints what I might have done wrong?
Thanks a lot!

okay, was a stupid mistake. Didn’t delete the old File of an earlier attempt.

Initial Problem was: /etc/twitter.token could not be written cause of etc/twitter.token (Permission denied)

So I changed User in /etc/default/openhab to root:root for the Twitter authentication process and afterwards back to my openhab user.

Is this the common procedure. And if it’s so - wouldn’t it be a great idea to note this in the Wiki? :smiley: