Skip to content

Issue with scope value #140

Open
Open
@anjalipowells

Description

@anjalipowells

Problem
When I try to create a client using Python SDK, I get a warning in scope value. If I follow the warning and fix it, I get error in scope value
Warning: Scope has changed from “manage_products:” to “manage_products:{project_key} view_products:{project_key}.
Error: Permissions exceeded. Only the following permissions can be requested: manage_products

Using the below code to connect:

client = Client(
    client_id="my-client-id",
    client_secret="my-client-secret",
    # scope=["manage_products:{project-key}"],
    scope=["manage_products:{project-key}", "view_products:{project-key}"],
    url="https://api.{region}.gcp.commercetools.com",
    token_url="https://auth.{region}.gcp.commercetools.com",
)

client = Client()

product = (
    client
    .with_project_key("project_key")
    .products()
    .with_id({guid_Id})
    .get())

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions