Skip to content

Permission Error #105

@kqvanity

Description

@kqvanity

After setting up the key, I got the following error

  python3 main.py
Error: 403 - {"type":"error","error":{"type":"permission_error","message":"Invalid authorization for organization"}}
Traceback (most recent call last):
  File "/home/keinvanity/Downloads/claude-misc/Claude-API/main.py", line 6, in <module>
    for conversation in conversations:
                        ^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable

source code

from claude_api import Client

claude_api = Client("CH-prefers-color-scheme=light; __ssid=a5.........a80; lastActiveOrg=367........-881f-b66e.....268; __stripe_mid=cad07f96.............f239331fac1ff7ad; sessionKey=sk-an........eQ-jIqAeAAA; cf_clearance=L...............")

conversations = claude_api.list_all_conversations()
for conversation in conversations:
    conversation_id = conversation['uuid']
    print(conversation_id)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions