Is there a way to configure credentials without using block?
Closed this issue · 0 comments
First off, thank you for this as I am transitioning from MWS to SP-API.
I am able to connect and pull orders using the AmzSpApi configuration in block form AmzSpApi.configure do |config|...
I have many users I need to rotate through and all the jobs run at the same time. When I configure using the AmzSpApi.configure in block form, it causes issues as I believe it is a global configuration change.
I'm trying to code it so that I can just update different refresh tokens per connection and have many jobs run at the same time.
I have been trying to figure this out for a couple days
I have tried this: AmzSpApi::SpApiClient.new(@debugging => false, :debugging => false, :region => 'na', :timeout => 20, :refresh_token => credential.refresh_token, :client_id => ENV['NA_SELLER_LWA_CLIENT_ID'], :client_secret => ENV['NA_SELLER_LWA_CLIENT_SECRET'], :c
as well as
config = AmzSpApi::Configuration.new() and then trying to assing config.refresh_token etc but that doesn't work either
I'm also willing to compensate for a solution, thank you