Returns the permissions granted to the current API connection.
osm_permissions(format = c("R", "xml", "json"))
If the API client is not authorized, an empty list of permissions will be returned. Otherwise, the list will be based on the granted scopes of the logged user.
Format of the output. Can be "R"
(default), "xml"
, or "json"
.
Currently the following permissions can appear in the result, corresponding directly to the ones used in the OAuth 2.0 application definition:
allow_read_prefs (read user preferences)
allow_write_prefs (modify user preferences)
allow_write_diary (create diary entries, comments and make friends)
allow_write_api (modify the map)
allow_write_changeset_comments
allow_write_redactions (redact element versions)
allow_read_gpx (read private GPS traces)
allow_write_gpx (upload GPS traces)
allow_write_notes (modify notes)
allow_write_redactions (redact map data)
allow_write_blocks (create and revoke user blocks)
allow_consume_messages (read, update status and delete user messages)
allow_send_messages (send private messages to other users)
Other API functions:
authenticate_osmapi()
,
osm_api_versions()
,
osm_capabilities()
,
set_osmapi_connection()
if (FALSE) {
perms <- osm_permissions()
perms
}
Run the code above in your browser using DataLab