POEMS API OAuth 2.0 Flows Details

Register with POEMS API to obtain OAuth 2.0 Credentials

Register with POEMS API to obtain OAuth 2.0 credentials such as a Client ID, Client Secret & API Key.


In order to access POEMS API, first you need to register in API portal, and then you will be given Client ID, Client Secrect and API Key upon succcessful registration.

OAuth 2.0 is an authorization method to provide access to resources over an HTTPS protocol. It is an open standard for authorization that enables applications to access server resources on behalf of a specific resource owner.

OAuth also enables Resource Owners (end users) to authorize limited third-party access to their server resources without sharing their credentials.

Obtain OAuth 2.0 API Access Token

POEMS API Gateway currently supports two OAuth 2.0 authorization flows,

1. App with POEMS Access


Applications require an authentication step where the user logs in with POEMS account.


Third party applications connects through authentication based on POEMS User ID and password. Also known as the authorization code grant, this is based on end-user authentication/ authorization. This flow involves three actors:

Resource Owner (POEMS Customer), Client App (your application), Authorization Server (POEMS API Gateway)

Below diagram illustrates the OAuth 2.0 Authorization Code authorization (3-legged OAuth) flow designated for client apps that intend to access a POEMS Customer's resource on an End-User Authentication basis.

  1. A user, as the resource owner, initiates a request to the client application.
  2. The client application sends the resource owner a re-direction to the POEMS API Gateway authorization endpoint with applicable query parameters. The POEMS Login Page is displayed on the Resource Owner's device browser.

    The Resource Owner must authenticate himself/herself by providing POEMS credentials in the login page, and click the Login button
  3. Upon successful user authentication, the authorization endpoint generates an authorization code and sends it to the client application using the client redirect URI.
  4. The client application requests for access token by sending the authorization code to the Token Endpoint exposed by the authorization server, providing a valid client_id and client secret pair in the header as form of HTTP Basic Authentication Scheme.
  5. Client application is able to access POEMS API resources with a valid access token.

  • URL to authenticate user, https://sandboxapi.poems.com.sg/api-gateway/pspl/auth/1.0/oauth/authorize
  • URL to request token, https://sandboxapi.poems.com.sg/api-gateway/pspl/auth/1.0/oauth/token

2. App without POEMS Access


Third party applications directly connect to our POEMS API using RSA256 Private and Public Key

Also known as the client credentials grant, this is based on trusted application-to-application communication.

This flow involves 2 actors: Client App (your application), Authorization Server (POEMS API Gateway)

The diagram illustrates the OAuth2.0 Client Credentials flow designated for trusted Client Apps who would like to access POEMS Resources on a higher-level Application-to-Application basis.

  1. The Client App requests for application-to-application authentication by sending a pre-defined identifier and signed token to the authorization endpoint.
  2. On successful authentication, the authorization endpoint returns the access token and refresh token (if necessary) to the client application.
  • URL to request token, https://sandboxapi.poems.com.sg/api-gateway/pspl/auth/1.0/oauth/token
Access POEMS API

After an application obtains an access token, it sends the token to POEMS API in an HTTP authorization header


POEMS API URL: https://sandboxapi.poems.com.sg/api-gateway/pspl/mobile2/1.0/global/order/today