Skip to content

wcapi.get('orders') returns 403 #42

@LucSpan

Description

@LucSpan

I connect to my WooCommerce webshop through the WooCommerce REST API Python wrapper,

I.e,

from woocommerce import API

wcapi = API(
    url="https://mywebshop.whatever",
    consumer_key="ck_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    consumer_secret="cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    wp_api=True,
    version="wc/v1"
)

API has read/write access.

All worked fine for months up to yesterday.


Problem

Since yesterday latest_order = wcapi.get('orders').json() returns a JSONDecodeError: Expecting value. Also, wcapi.get('orders') returns a <Response [403]>.

I don't know what's causing this all of a sudden and I'm not sure how to solve it either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions