Concetti
Scope
Gli scope decidono cosa può fare una chiave. Li scegli quando crei la chiave: dai a ogni chiave solo ciò che le serve.
Una richiesta a un endpoint il cui scope manca nella chiave fallisce con 403 INSUFFICIENT_SCOPE. Non è possibile aggiungere scope a una chiave esistente: crea una nuova chiave e revoca quella vecchia.
Non disponibili: pagamenti, wallet, token, trasferimenti e impostazioni dell'account. Nessuno scope dà accesso a queste funzioni.
Tutti gli scope#
| Scope | Consente di |
|---|---|
profile:read | Leggere il tuo profilo e i profili pubblici degli altri utenti. |
posts:read | Leggere i post (i tuoi e quelli che puoi vedere nell'app) e i relativi commenti. |
posts:write | Caricare media, pubblicare, modificare ed eliminare i tuoi post. |
comments:write | Scrivere commenti ed eliminare i tuoi commenti (o i commenti ai tuoi post). |
likes:write | Mettere e togliere like ai post. |
follows:write | Seguire e smettere di seguire utenti. |
stories:write | Pubblicare storie. |
store:read | Leggere il tuo store Bloop e i suoi prodotti. |
store:write | Modificare lo store, creare, aggiornare ed eliminare prodotti, aggiornare il magazzino. |
orders:read | Leggere gli ordini ricevuti dal tuo store. |
orders:write | Segnare gli ordini come spediti. |
chat:read | Leggere le tue conversazioni e i relativi messaggi. |
chat:write | Inviare messaggi (con la regola anti-spam). |
Endpoint per scope#
Tutti i percorsi sono relativi a https://api.linework.app/open/v1.
| Endpoint | Scope |
|---|---|
GET /me | profile:read |
GET /users/{id} | profile:read |
GET /users/by-username/{username} | profile:read |
GET /me/posts | posts:read |
GET /users/{id}/posts | posts:read |
GET /posts/{id} | posts:read |
GET /posts/{id}/comments | posts:read |
POST /media | posts:write, stories:write o store:write |
POST /posts | posts:write |
PATCH /posts/{id} | posts:write |
DELETE /posts/{id} | posts:write |
POST /posts/{id}/comments | comments:write |
DELETE /comments/{id} | comments:write |
POST DELETE /posts/{id}/like | likes:write |
POST DELETE /users/{id}/follow | follows:write |
POST /stories | stories:write |
GET /store | store:read |
POST PATCH /store | store:write |
GET /store/products | store:read |
POST /store/products | store:write |
PATCH DELETE /store/products/{id} | store:write |
PATCH /store/products/{id}/stock | store:write |
GET /store/orders | orders:read |
GET /store/orders/{id} | orders:read |
POST /store/orders/{id}/ship | orders:write |
GET /conversations | chat:read |
GET /conversations/{id}/messages | chat:read |
POST /conversations/{id}/messages | chat:write |
POST /messages | chat:write |
Il Riferimento API è la fonte ufficiale: ogni operazione indica lo scope richiesto.
Combinazioni consigliate#
| Integrazione | Scope |
|---|---|
| Bot di pubblicazione | profile:read posts:read posts:write stories:write |
| Community manager | posts:read comments:write likes:write |
| Sincronizzazione store | store:read store:write orders:read orders:write |
| Bot di assistenza in chat | chat:read chat:write (+ orders:read per consultare gli ordini) |