I need to create notification application. It should be server side app and it posted direct messages and public depends of problem category. No human interaction))
I registered app under my account. Get concumer key and secret. Switched access from read only to rw+access to direct messages. Next thing I use erlang_oauth. First I start with their twitter example app. Next I make request token call. Lib make request and give me token. Next I login to my account in browser. Copy past url with request token to browser, allow access for my application and get PIN. Without with empty pin get access exception in my app.
Restart application, get new request token and input this PIN. It was not valid any more. Next time I pause after get request token. Login in browser, copy-past generated url, get pin, input pin to app and get access token pair. I should save that access pair and use it for my auth. But get several problem with all this activities.
First how long request tokens is active? For example, I send url to client by email, and they get it next day. Will those request token will be valid?
Second how long access token will be valid if user will not reject their approval?