cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.4 API Python

SOLVED

Magento 2.4 API Python

Maybe someone has an example of how to connect to the Magento 2.4 API via Python?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Magento 2.4 API Python

Nevermind.. this is the solutiom I was looking for:

from requests_oauthlib import OAuth1Session

client_key    = ''
client_secret = ''
access_token  = ''
access_secret = ''

base_url      = ''

magento = OAuth1Session(client_key,
                        client_secret = client_secret,
                        resource_owner_key = access_token,
                        resource_owner_secret = access_secret)

View solution in original post

2 REPLIES 2

Re: Magento 2.4 API Python

Nevermind.. this is the solutiom I was looking for:

from requests_oauthlib import OAuth1Session

client_key    = ''
client_secret = ''
access_token  = ''
access_secret = ''

base_url      = ''

magento = OAuth1Session(client_key,
                        client_secret = client_secret,
                        resource_owner_key = access_token,
                        resource_owner_secret = access_secret)

View solution in original post

Re: Magento 2.4 API Python

Hello @evaldasbar9c8d 

 

you need to install the Magento library using the below command 

pip install python-magento==0.1.0

 

for more please visit Python Magento library Doc

 

Thanks & Regards