v3 Ushahidi Platform REST API Documentation
  • V3
    • Overview
    • Login & Register
    • Posts
      • Sub Posts & Translation
    • Tags
    • Configuration
    • Data provider
    • Country Code
    • Tos
    • Permissons
    • Roles
    • Users
      • User Settings
    • Saved Search
    • Collections
      • Collections Page
    • Messages
    • Exports
    • Contacts
    • HXL
    • Media
    • Verifier
    • Migration
    • Notification
    • Layer
    • Webhooks
    • Api Keys
    • Forms
      • Form Attribute
      • Form Contacts
      • Form Role
      • Form Stages
    • CSV
    • Test
  • V5
    • Overview
    • Posts
    • Surveys
    • Categories
Powered by GitBook
On this page
  1. V3

Login & Register

PreviousOverviewNextPosts

register

POST https://ushahididocs.api.ushahidi.io/api/v3/register

Request Body

Name
Type
Description

email*

String

The user's email address

password*

String

The user's password

{
    "id": 13,
    "url": "http://localhost:8000/api/v3/users/13",
    "email": "test@ushahidi.com",
    "realname": null,
    "logins": 0,
    "failed_attempts": 0,
    "last_login": null,
    "last_attempt": null,
    "created": "2022-11-03T23:19:23+00:00",
    "updated": null,
    "role": "user",
    "language": null,
    "contacts": [],
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search",
        "read_full",
        "register"
    ],
    "gravatar": "276f7d2512f5e6e6f99b5e405b944581"
}

password reset

POST https://ushahididocs.api.ushahidi.io/api/v3/passwordreset

Request Body

Name
Type
Description

email*

String

The user's registered email address

confirm password reset

POST https://ushahididocs.api.ushahidi.io/api/v3/passwordreset/confirm

Request Body

Name
Type
Description

token*

String

The password reset token the user received in their mail

password*

String

The user's new password

  • POSTlogin
  • register
  • password reset
  • confirm password reset

login

post
Authorizations
Body
usernamestringRequired

The Ushahidi login username/email

Example: test@ushahidi.com
passwordstringRequired

The Ushahidi password

Example: Doc@test2022
grant_typestringRequired

Login grant type. Use Password for this grant type

Example: password
client_idstringRequired

The user client ID

Example: ushahidiui
client_secretstringRequired

The client unique secret indentifier

Example: 35e7f0bca957836d05ca0492211b0ac707671261
scopestringOptional

You need to also provide the scope. you can add multiple scope to this parameters. (Scope Options - posts, country_codes, media, forms, api, tags, savedsearches, sets, users, stats, layers, config, messages, notifications, webhooks, contacts, roles, permissions, csv, tos dataproviders, migrate, apikeys)

Example: posts country_codes media forms api tags savedsearches sets users stats layers config messages notifications webhooks contacts roles permissions csv tos dataproviders migrate apikeys
Responses
200
OK
application/json; charset=UTF-8
post
POST /oauth/token HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 359

"username='test@ushahidi.com'&password='Doc@test2022'&grant_type='password'&client_id='ushahidiui'&client_secret='35e7f0bca957836d05ca0492211b0ac707671261'&scope='posts country_codes media forms api tags savedsearches sets users stats layers config messages notifications webhooks contacts roles permissions csv tos dataproviders migrate apikeys'"
200

OK

{
  "token_type": "Bearer",
  "expires_in": 54000,
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjUzZGQ3OWJlZjgxZDZhYmYzMmE5MjI2NjM5MTM5ZjE3MDQyOTBlOTFlZTYxOWIxNTAyMWUxMTJmYTM4MWFlNGY5ZWUwNTU0NDZkY2Q5NmZjIn0.eyJhdWQiOiJ1c2hhaGlkaXVpIiwianRpIjoiNTNkZDc5YmVmODFkNmFiZjMyYTkyMjY2MzkxMzlmMTcwNDI5MGU5MWVlNjE5YjE1MDIxZTExMmZhMzgxYWU0ZjllZTA1NTQ0NmRjZDk2ZmMiLCJpYXQiOjE2NTU5ODQ0NDcsIm5iZiI6MTY1NTk4NDQ0NywiZXhwIjoxNjU2MDM4NDQ3LCJzdWIiOiIyIiwic2NvcGVzIjpbInBvc3RzIiwiY291bnRyeV9jb2RlcyIsIm1lZGlhIiwiZm9ybXMiLCJhcGkiLCJ0YWdzIiwic2F2ZWRzZWFyY2hlcyIsInNldHMiLCJ1c2VycyIsInN0YXRzIiwibGF5ZXJzIiwiY29uZmlnIiwibWVzc2FnZXMiLCJub3RpZmljYXRpb25zIiwid2ViaG9va3MiLCJjb250YWN0cyIsInJvbGVzIiwicGVybWlzc2lvbnMiLCJjc3YiLCJ0b3MiLCJkYXRhcHJvdmlkZXJzIiwibWlncmF0ZSIsImFwaWtleXMiXX0.WTJ3GF2osjYbbnwe1Nlmvv9aOd8Dv6qz9H4QMOCPISWXZKvv59qTJPGGDiJKBu9KpfTLrfcfLqA6-x4CprMz3Bausmp7LIpTybO-K2OKLikt3UjbPs9qDMjct49dD_ylapUFhyLkTjjkRQIAIJfOupgK09IWovd18NNMRqcyzi-cE_Ki_5SvY1jeQMDEYNIfuCtDPFmofa9RH6jIpl9LEmp88llYkBHMAzhORVmTaMer7KN_35BbgP0eyWEtgMxdQMrygsXuBOYDP58-Brx0baxPFNfHvoP2hu5heQfOvlwWtX7wTLB8Pg8N5smdS3Xk-f4CsmYBKDl8nvvmD0S3-MPb9h8jue-BVo3DTkJylxORm4hiAaaBXoxaJs9trh847Fmw7D3IjGPte2F7KHuMWClbwGSIvUDBL-9FvBMAOcZXmi1mEISTF-ybGHc32uM87Vcc-mtDJCHzI9CCUW7_dhLYxP2-cP0oT_DDW3jDyUdj1qQMphBH2WoVgednWgKAbvZydPP1I8MCQFXuU7lcYqgCoGrVyS0_Me_ZdnrutHkxDbJyKl0Ev7m3W2ILTsUkdW7TYqItxlsthWJT3QxRD7X81pPYspH0BlUznAPeeHwLs6UHz093Ao2Uvup5hMP4rbXBLd7_ccBqx3ALuqEp2NociTorwjPq7i3MMVMB5kA",
  "refresh_token": "def502003eb18299266d788cfb81b2a84a2f100e60347eb828157609bc6cc9ddd49bd61125210ca916fd9f51df3e845d9180fc43462ce143fb11b067e46ae740d95582b011165b7a7ec0a26e79b5ec6fae3cb97927f8ac0ae0263a674c9248adb22a9f2cbc97e33ff63b7ae84b9e10faf74730360c5a78facff0ee105ba864d67c02cf0a542428806ba302874a706e52b692b1b1ce0dd97ea904e9df1852517ca9b0bc82c645a8422353f16f345708206aa944fbc87efce60be96ad07a2114433060f5cd8edf8e1d9bed9015ee033f9af71da68a80a29e996c56db637ac21922caccaa13d396914fe57faa1debe5017b31a41cc2907ddfd898fd339aa1c25c2e53033b5fdf5f010404bb6295d6022907e2a6061e7530b1b2181f2aa3193bf8dd19e37594a480de606786ab181b31971d52f8280f2b6661de17823287b62e62e3933aa3d57094f2c2a13eafd821002c4c194548859e5b8024d8e0b7993c14186bff7390daf38e68f03bf1ba04336e267b6e1424d64b5f0ee2d15a46bb084fadaceeff0e9b5ee5ec9fca8d5ebd2765e5483669c8cd0da6d845d9a67b5cfd1287e0686d0dc92a332132d7b690bbbff53e29cee01bf91ead2e3bfde1e3d73c6985bf3c67e2d0c6c169ef28b2cd0e7cc787d212d31fb5cc14dc4bed1fc67ddbd1d59880664fba1851f423192aab47e6ee93118e21b6c805158d0bba4dfba46d364d23f73358ad82be16608556f3b619b698365ec7e2d4761f57eb40eab6e3e98039394f0490f541db1bfaaf04bbc268c4ac1e0dbdcb1fd15cfc1a3427abeb1da62ad0e4fb89b1e24bd50b1847c66e8f6c"
}