"Api-Key" e "Api-Username" per 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 Mi Piace

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

1 Mi Piace

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

2 Mi Piace

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 Mi Piace

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 Mi Piace

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 Mi Piace

Ciao, qualcuno può dirmi la differenza e l’uso di Api-key e Api-Username.

Il nome utente dell’API indicherà a Discourse quali funzionalità sono abilitate. Un amministratore o un utente normale non hanno le stesse funzionalità e l’utilizzo di uno o dell’altro limiterà ciò che è possibile ottenere utilizzando l’API.

La chiave API è la password da utilizzare con il nome utente dell’API.

1 Mi Piace

Nel mio scenario voglio usare solo l’API di discourse e la mia confusione è che ogni utente che usa la mia app può creare post, mettere like, commentare altre funzionalità, quindi ora devo creare un nome utente API e una chiave API per ogni utente per usare le rispettive API?

Hai letto la documentazione dell’API?

specialmente questo

anche questi

1 Mi Piace

Secondo il documento ho creato una chiave API “Tutti gli utenti”, ma sto riscontrando questo errore

{
    "errors": [
        "Non sei autorizzato a visualizzare la risorsa richiesta. Il nome utente o la chiave API non è valido."
    ],
    "error_type": "invalid_access"
}

in Postman quando richiamo questa API /tags.json.
Puoi aiutarmi con questo?

Puoi pubblicare qui la tua richiesta completa?

1 Mi Piace