„Api-Key“ und „Api-Username“ für try.discourse.org?

Hi, I would like to create some weekly statistic reports using the REST API. I will be doing this for
forum linkingyourthinking com

but I would like to start early before I have gotten the keys from the administrator which might take a while, since they are in the middle of a 6 week workshop.

So I was hoping to begin right now with try.discourse.org, Is that possible? I have tried
curl -X GET https://try.discourse.org/site.json
and it works nicely.

You can set up a local development instance of discourse for such work. It is fairly simple to do so.

See How do I set up a local Discourse Development Environment?

6 „Gefällt mir“

Thanks for the tip! Will there by any demo data in such an instance: users, groups and posts?

1 „Gefällt mir“

There will be some default seeded data but you’re always free to create some data as per your own need.

2 „Gefällt mir“

If you are doing reports on public data on try.discourse.org you won’t need the API keys, as the GET requests will work just fine without it!

3 „Gefällt mir“

Thank you! I don’t have the terminology clear for me right now. I want to

  • list all groups
  • for each group, list group member statistics: seen, posts, read time, …
  • do this on a weekly basis and mail to the group leaders/guides.

That data is probably not public?

1 „Gefällt mir“

It is! Discourse aims to be an open and crawleable platform by default. In fact you can even do the same on Meta.

curl https://meta.discourse.org/g.json

curl https://meta.discourse.org/groups/translators/members.json?offset=0&order=&asc=true&filter=

https://meta.discourse.org/u/falco/summary.json

Group leader data will be on the first request.

:slightly_smiling_face:

7 „Gefällt mir“

Hallo, kann mir jemand den Unterschied und die Verwendung von API-Schlüssel und API-Benutzername erklären?

Der API-Benutzername teilt Discourse mit, welche Funktionen aktiviert sind. Ein Administrator und ein normaler Benutzer haben nicht die gleichen Fähigkeiten, und die Verwendung des einen oder anderen schränkt ein, was Sie mit der API erreichen können.

Der API-Schlüssel ist das Passwort, das mit dem API-Benutzernamen verwendet werden soll.

1 „Gefällt mir“

In meinem Szenario möchte ich nur die Discourse-API verwenden, und meine Verwirrung ist, dass jeder Benutzer, der meine App nutzt, Beiträge erstellen, liken, kommentieren und andere Funktionen nutzen kann. Möchte ich also für jeden Benutzer einen API-Benutzernamen und einen API-Schlüssel erstellen, damit er die jeweiligen APIs nutzen kann?

Haben Sie die API-Dokumentation gelesen?

insbesondere diese

auch diese

1 „Gefällt mir“

Gemäß dem Dokument habe ich einen API-Schlüssel für „Alle Benutzer“ erstellt, aber ich erhalte diesen Fehler

{
    "errors": [
        "Sie dürfen die angeforderten Ressourcen nicht anzeigen. Der API-Benutzername oder -Schlüssel ist ungültig."
    ],
    "error_type": "invalid_access"
}

in Postman, während ich diese API /tags.json aufrufe.
Können Sie mir bitte dabei helfen?

Können Sie Ihre vollständige Anfrage hier posten?

1 „Gefällt mir“