Media id expires about 24 hours?


#1

I am working for auto reply system with mp4 movie.
I want to catch some hashtag and reply to that post with some text and mp4 movie.

mp4 is heavy to upload every time, so I want to upload mp4 movie just one time
and use media id for every reply.

I uploaded mp4 file with twurl… get media id, and tweet with media id.
first time it works fine. ( I am using twitter gem https://github.com/sferik/twitter )

irb(main):020:0* twitter_client.update('update with media id try 2nd!! 20180129', media_ids: 957792326637596677)
=> #<Twitter::Tweet id=957793005833875456>

but about over 24 hours pass, it looks like media id is not working.
error message like this.

Twitter::Error::BadRequest: One or more media keys are not managed

irb(main):010:0* twitter_client.update('update with media id try ! 20180129', media_ids: 956097163263488000)
Twitter::Error::BadRequest: One or more media keys are not managed.
        from /home/adam/rails/works/twitter_stream/vendor/gems/twitter-6.1.0.gameon/lib/twitter/rest/response/raise_error.rb:13:in `on_complete'
        from /home/adam/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/faraday-0.11.0/lib/faraday/response.rb:9:in `block in call'
        from /home/adam/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/faraday-0.11.0/lib/faraday/response.rb:61:in `on_complete'
        from /home/adam/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/faraday-0.11.0/lib/faraday/response.rb:8:in `call'
        from /home/adam/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/faraday-0.11.0/lib/faraday/request/url_encoded.rb:15:in `call'
        from /home/adam/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/faraday-0.11.0/lib/faraday/request/multipart.rb:14:in `call'
        from /home/adam/rails/works/twitter_stream/vendor/gems/twitter-6.1.0.gameon/lib/twitter/rest/request/multipart_with_file.rb:21:in `call'
        from /home/adam/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/faraday-0.11.0/lib/faraday/rack_builder.rb:139:in `build_response'
        from /home/adam/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/faraday-0.11.0/lib/faraday/connection.rb:377:in `run_request'
        from /home/adam/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/faraday-0.11.0/lib/faraday/connection.rb:177:in `post'
        from /home/adam/rails/works/twitter_stream/vendor/gems/twitter-6.1.0.gameon/lib/twitter/rest/request.rb:33:in `perform'
        from /home/adam/rails/works/twitter_stream/vendor/gems/twitter-6.1.0.gameon/lib/twitter/rest/utils.rb:50:in `perform_request'
        from /home/adam/rails/works/twitter_stream/vendor/gems/twitter-6.1.0.gameon/lib/twitter/rest/utils.rb:72:in `perform_request_with_object'
        from /home/adam/rails/works/twitter_stream/vendor/gems/twitter-6.1.0.gameon/lib/twitter/rest/utils.rb:64:in `perform_post_with_object'
        from /home/adam/rails/works/twitter_stream/vendor/gems/twitter-6.1.0.gameon/lib/twitter/rest/tweets.rb:158:in `update!'
        from /home/adam/rails/works/twitter_stream/vendor/gems/twitter-6.1.0.gameon/lib/twitter/rest/tweets.rb:128:in `update'
        from (irb):10
        from /home/adam/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/railties-4.1.11/lib/rails/commands/console.rb:90:in `start'
        from /home/adam/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/railties-4.1.11/lib/rails/commands/console.rb:9:in `start'
        from /home/adam/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/railties-4.1.11/lib/rails/commands/commands_tasks.rb:69:in `console'
        from /home/adam/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/railties-4.1.11/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
        from /home/adam/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/railties-4.1.11/lib/rails/commands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'
irb(main):011:0>

Is this normal?