Recipes

Send a private message

await client.messages.send(to = 'recipient', message = 'hello')

Read the inbox

inbox = await client.messages.inbox()

for m in inbox.messages:
    print(m.username, m.date, m.message)

print('conversations:', inbox.conversation_ids)

Walk the feed

for thread in await client.feed.home():
    print(thread.tid, thread.title, thread.link)

for thread in await client.feed.explore():
    print(thread.tid, thread.title, thread.link)

feed.explore() covers the marketplace landing; tids are None for slug-rewritten URLs that don’t carry one. feed.home() covers /index.php. Both deduplicate the title-link / “last post” link pair into a single ThreadSummary per thread.

Browse a forum category

response = await client.threads.get_forum(13)
threads = client.feed.extract_thread_summaries(response.text)

for thread in threads:
    print(thread.tid, thread.title)

Reply to a thread

await client.threads.reply(tid, message = 'great post')

Create a new thread

await client.threads.create(forum_id = 13, subject = 'hi', message = 'first post')

Send credits

You bring your own hCaptcha token:

await client.credits.send(
    username = 'recipient',
    amount = 100,
    captcha_token = solved_token,
)

Send reputation

Validates your reputation value against the allowed amounts on the target’s rep page (raises OGUReputationError otherwise):

await client.reputation.send(
    reputation = 1,
    comment = 'good trade',
    uid = 12345,
)

Skip validation with validate = False.

Recently-sent credits

for tx in await client.credits.recently_sent():
    print(f'{tx.sender}{tx.recipient}  {tx.amount} @ {tx.date}')

Look up a user profile

user = await client.users.get_by_username('forgivenforget')
print(user.user_id, user.credits, user.reputation, user.vouches)

get_by_id(uid) is the same shape, indexed by user id.

Update your signature

await client.usercp.update_signature('new sig')

Other usercp updates — update_notepad, update_options, update_profile, change_username, change_password, change_email — follow the same shape: pass the new value, the SDK handles my_post_key.

Search the forum

response = await client.search.search(keywords = 'discord username')

Persist & resume a session

async with OGUClient() as client:
    await client.session.login('user', 'pass')
    cookies = {c.name: c.value for c in client.cookies}

# later
client = OGUClient()
for name, value in cookies.items():
    client.cookies.set(name, value)

Use a proxy

client = OGUClient(proxy = 'user:pass@host:8080')