Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8936967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:19:37+00:00 2026-06-15T10:19:37+00:00

I need help with problem. I have website integrated with Stocktwits using omniauth-stocktwits gem.

  • 0

I need help with problem. I have website integrated with Stocktwits using omniauth-stocktwits gem. I want to use Stocktwits API to fetch commentary stream. So, I need access_token!

After user authorizes my App at StockTwits I see that I get redirect to my /callback URL with “code” parameter. As I can see in omniauth code this “code” field dont’ used for anything. So I decided to try to get access_token how it recommended in api documentation:

curl -X POST https://api.stocktwits.com/api/2/oauth/token -d 'client_id=MY_CLIENT_ID&client_secret=MY_SECRET&code=CODE_FROM_REDIRECT_PARAMS&grant_type=authorization_code&redirect_uri=http://my.site.url'

I was trying many times. With gurl, with HTTParty (my site written in Ruby) – one result:

"errors"=>["code doesn't exist or has expired"]}

or
{“response”:{“status”:403},”errors”:[{“message”:”Permission denied”}]}

I really sure that all scopes was used and I authorizesa app to read streams, so what permissions are denied I have no idea…

I dont’ know how code can be expired if I just get it 🙁

Where is error? How can I get access_token? Please, any help will be good 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:19:38+00:00Added an answer on June 15, 2026 at 10:19 am

    That is the correct flow and the right end-point to get the access token once you have the code. Here’s our authentication flow: http://stocktwits.com/developers/docs/authentication

    I’m not sure why you’re getting an invalid code, could you try getting the user’s code without the omniauth gem? Or try teaching out to the omniauth-stocktwits gem author: https://github.com/jesseyoungmann/omniauth-stocktwits

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need help with CMD scripts. Here is my problem: I have list of
I have an interesting SQL problem that I need help with. Here is the
I have a complicated problem, and I need help. I have a base case,
I need some help in solving this problem. We have a large amount of
I have problem with tooltips on my magento website, I need to have one
We have a security problem here and we really need your help and inputs.
I need help with a problem regarding data saved in a parent-children model table
Need some help with this problem in implementing with XSLT, I had already implemented
i got some problem and need help .. my plan : 1. get ip
I need some help with a small php problem. But i dont know how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.