Steps for API Authentication

api
onemap
authentication
step

#1

Go to Chrome Store and download “Postman”. This is a good application for testing out OneMap 2.0 web-services.

After opening up “Postman”, these are the steps

1. Open a new Tab

2. Select “POST” method.

3. Put in the URL  https://developers.onemap.sg/privateapi/auth/post/getToken

4. Click on the Body Tab

5. Select “Form-Data”

6. Put in values for email and password

7. Press “Send”

8. Walla, you should receive a token json object that shares some resemblance to below
{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjY1MywidXNlcl9pZCI6NjUzLCJlbWFpbCI6ImNyaXp6c18yQGhvdG1haWwuY29tIiwiZm9yZXZlciI6ZmFsc2UsImlzcyI6Imh0dHA6XC9cL29tMi5kZmUub25lbWFwLnNnXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNTAxODMyMjY4LCJleHAiOjE1MDIyNjQyNjgsIm5iZiI6MTUwMTgzMjI2OCwianRpIjoiZWU3M2I5ZDVhMjA2MGNmODUyZWU2OTcyYjA2MWJhY2QifQ.us8JTdiGDKVyU4_J_65WFZdreH80T69EzTEuWEMHCT0",
    "expiry_timestamp": 1502091438
}
  1. For Coding sample, Click on “Codes” link on your right

  2. You will see some code snippets like below for your references.

Apart from documentation, we are also actively sharing our codes on Github


API Registration
How to get an Access Token
Getting Access Token with FME
Steps for API Authentication Guide still working?
pinned #2