klaviyo-api-ruby
klaviyo-api-ruby copied to clipboard
How do I use the SDK with Bearer access tokens?
I'm not finding anything that allows me to use the SDK using a bearer access token from an OAuth2 authintication.
Surely the package isn't missing this kind of support?
OAuth isn't currently support but will be coming shortly.
It is however possible to bypass the api key and just pass your header in as a header parameter
KlaviyoAPI.configure do |config|
# don't put api-key here like normal
end
key = "Bearer #{$YOUR_TOKEN_KEY}"
response = KlaviyoAPI::Accounts.get_accounts({
header_params: {
'Authorization': key,
},
})