-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to change refresh_token #5
Comments
Sorry about opening this issue. I read more about the code of this gem, and figure out a way to do this. |
Rather than all of us code diving, it would be great if you (or someone) could put newcomers to how to do that. That is step 1 of connecting to the SP-API and it is not totally clear - at least to me - how to do that. If it is in this code it would be nice to highlight it (or maybe even put it on the Readme) |
@LksNuns how did you do it? |
@philsmy @jakemcallister @LksNuns How to handle the first step? Does the gem handle the OAuth flow? How does my code know which Amazon vendor it is handling? Thanks so much in advance |
@philsmy instead of asking others to do work, why don't you dive in and submit a pull request? |
@tarekrahme There is some information here that might be helpful - #17. |
Once you save it, the refresh token does not change. The client requests new This is how i'm instantiating API clients for each account in my application: https://www.blandersoft.com/short/sp-api/ |
Thanks so much @blairanderson @mendywoly The OAuth flow will allow me to get the refresh token which I then use to make queries to the Amz SP API. Correct? Am I missing something? |
I didn’t see any oauth helpers in this gem. You need to receive the code and convert to refresh token.On Mar 28, 2023, at 3:54 PM, Tarek Rahme ***@***.***> wrote:
Thanks so much @blairanderson @mendywoly
So just to confirm, I have to handle OAuth flow first (not handled by this gem).
The OAuth flow will allow me to get the refresh token which I then use to make queries to the Amz SP API.
Correct? Am I missing something?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@tarekrahme see if this helps you at all. #43 |
Once again thanks a lot @blairanderson @mendywoly I really appreciate it |
Hi, I have an application, and I want to fetch data from Amazon for each user. I started to read the amazon documentation and this library.
Every time the user authorizes my app, we received a
code
from this user to generate anaccess_token
andrefresh_token
through LWA.Looking into the code I found
amz_sp_api/lib/sp_api_client.rb
Line 46 in 31d6a1e
I tried creating a new
AmzSpApi::SpConfiguration.new
to use inAmzSpApi::SpApiClient.new(config)
, but then all attributes come with nil.There is a way to only change the
refresh_token
?The text was updated successfully, but these errors were encountered: