Retrieve MySejahtera App's data from MySejahtera API and show to users via web browser. Written in PHP

Overview

MySejahtera-PHP-Web

mysj

Retrieve MySejahtera App's data from MySejahtera API and show to users via web browser. Written in PHP.

Disclaimer

  1. This web app isn't affiliated with MySejahtera !
  2. This web app won't record user's MySejahtera username and password as this web app will just simply pass the username / password to the API and retrieve the x-auth-token. When requesting semak-vaksin.php and pdf-digital-cert.php , x-auth-token retrieved from login will be POST to it and they will use the x-auth-token that receieved to retrieve the data.
  3. I will not be responsible not be liable for any problem that will produce losses or inconveniences incurred as a result of such changes or differences.
  4. MySejahtera's API on this web app was grabbed via ProxyMan on iPadOS and iOS version of MySejahtera (User Agent used in this PHP Web App when making request to MySejahtera : MySejahtera/1.0.36 (iPhone; iOS 14.4.2; Scale/2.00))

About this project

Inspired by nakvaksin.com.
I created a website to check vaccination record via JKJAV's API.
But their API keep returning 500 error for some reason (Seems like rate limit error , no workaround currently).
So I decided to create a web app / website that can retrieve MySejahtera API and return the data to users via broswer instead of their original app.
Parts of MySejahtera's API directly grab from nakvaksin.com , including Login , Personal Details , Vaccination Process Flow.
A big thanks to nakvaksin.com's teams here!

What can I do with this PHP Web App?

You can :

  1. Retrieve your personal risk status , vaccination status and your NRIC number / Passport Number.
  2. Retrieve your Vaccination Process , including 1st Dose Appointment and 2nd Dose Appointment.
  3. Retrieve your PDF version of Vaccine Digital Certificate , a new feature launched by MySejahtera.

Note : You must key in your Date of Birth first into MySejahtera Personal Details before you can generate your PDF version of Vaccine Digital Certificate.

How to retrieve login credentials on MySejahtera's API

  1. Login

Do a POST request to here https://mysejahtera.malaysia.gov.my/epms/login with form and header below :

Header :
User-Agent: MySejahtera/1.0.36 (iPhone; iOS 14.4.2; Scale/2.00)
Host: mysejahtera.malaysia.gov.my
Content-Type: multipart/form-data;boundary=31

Form : 
username=60XXXXXXXX
password=XXXXXXX

200 if success , 401 if username or password did not match the record in MySejahtera. Notice the x-auth-token response headers if you get 200 , the token is MySejahtera API's login credentials.

  1. Retrieve personal details

Do a GET request to here https://mysejahtera.malaysia.gov.my/epms/v1/mobileApp/vaccinationEmployeeInfo with header below :

Header :
User-Agent: MySejahtera/1.0.36 (iPhone; iOS 14.4.2; Scale/2.00)
Host: mysejahtera.malaysia.gov.my
x-auth-token: <X-AUTH-TOKEN you get at Step 1>

200 if success , 500 if x-auth-token invalid.

  1. Retrieve vaccination process

Do a GET request to here https://mysejahtera.malaysia.gov.my/epms/v1/mobileApp/vaccination/processFlow with header below :

Header :
User-Agent: MySejahtera/1.0.36 (iPhone; iOS 14.4.2; Scale/2.00)
Host: mysejahtera.malaysia.gov.my
x-auth-token: <X-AUTH-TOKEN you get at Step 1>

200 if success , 500 if x-auth-token invalid.

  1. Generate PDF version of Vaccine Digital Certificate

Do a GET request to here https://mysejahtera.malaysia.gov.my/epms/v1/mobileApp/vaccination/certificate/generate with header below :

Header :
User-Agent: MySejahtera/1.0.36 (iPhone; iOS 14.4.2; Scale/2.00)
Host: mysejahtera.malaysia.gov.my
x-auth-token: <X-AUTH-TOKEN you get at Step 1>

200 if success , 500 / 401 / 403 if x-auth-token invalid.

  1. Download PDF version of Vaccine Digital Certificate

Do a GET request to here https://mysejahtera.malaysia.gov.my/epms/v1/mobileApp/vaccination/certificate/download with header below :

Header :
User-Agent: MySejahtera/1.0.36 (iPhone; iOS 14.4.2; Scale/2.00)
Host: mysejahtera.malaysia.gov.my
x-auth-token: <X-AUTH-TOKEN you get at Step 1>

200 if success , 500 / 401 / 403 if x-auth-token invalid.

Note : for Step 4 and 5 , you must key in your Date of Birth first into MySejahtera Personal Details before you can generate and download your PDF version of Vaccine Digital Certificate or else you will get stucked on Step 4.

Requirements to deploy this PHP Web App

  1. PHP installed , 7.0 + is recommended
  2. Web server that configured properly to work with PHP
  3. Internet access
  4. reCaptcha site key (Replace the sitekey to ur own one in index.html)

Error code

  1. 401 on details.php

Your username or password did not match the record in MySejahtera. Please check your username and password.

  1. 403 on semak_vaksin.php / pdf-digital-cert.php

You did not provide token to check your vaccine details. Please try to login again.

  1. 401 on semak_vaksin.php / pdf-digital-cert.php

The x-auth-token is expired. You need to relogin at the main page.

Screenshots

personal_risk personal_vax pdf-digital-error-no-token pdf-digital-error-token-expired

Credit

  1. MySejahtera
  2. nakvaksin.com
You might also like...
Roundcube Webmail is a browser-based multilingual IMAP client with an application-like user interface.

Roundcube Webmail roundcube.net ATTENTION This is just a snapshot from the GIT repository and is NOT A STABLE version of Roundcube. It's not recommend

Browser Administration for Linux-Based Audio/Video-Player like ODROID or Raspberry Pi
Browser Administration for Linux-Based Audio/Video-Player like ODROID or Raspberry Pi

Browser Administration for Linux-Based Audio/Video-Player like ODROID or Raspberry Pi.

Database browser for the WoW Alpha Core project

Database browser for the WoW Alpha Core project

Koel is a simple web-based personal audio streaming service written in Vue and Laravel
Koel is a simple web-based personal audio streaming service written in Vue and Laravel

Koel (also stylized as koel, with a lowercase k) is a simple web-based personal audio streaming service written in Vue on the client side and Laravel on the server side. Targeting web developers, Koel embraces some of the more modern web technologies – CSS grid, audio, and drag-and-drop API to name a few – to do its job.

:panda_face: Jitamin is a free software written in PHP, intended to handle the project management over the web. QQ群: 656868

Jitamin Jitamin (pronounced /ˈdʒɪtəmɪn/) is a free software written in PHP, intended to handle the project management over the web. Jitamin is inspire

Open Source Point of Sale is a web based point of sale application written in PHP using CodeIgniter framework.

Open Source Point of Sale is a web based point of sale application written in PHP using CodeIgniter framework. It uses MySQL as the data back end and has a Bootstrap 3 based user interface.

Web based groupware server written in PHP
Web based groupware server written in PHP

EGroupware Tools Usage runs unit-tests after each commit scrutinizer runs static analysis on our codebase manual testing with unusual browser versions

WebDirStat is a disk usage utility for web servers written in PHP
WebDirStat is a disk usage utility for web servers written in PHP

WebDirStat is disk usage utility for web servers, it’s a single PHP file that gives you statistics about disk usage inside a specific Directory ordered by size, in a form of a simple tree table.

The best kernel for simple apps

Sunflower Sunflower is a super small application kernel that is used to build a dependency injection container. This kernel is useful for microservice

Owner
Sam Sam
Juz a normal person. Malaysian , Secondary School
Sam Sam
The objective of this project is to manage The Website Manga, this site permits to Client to show, read and download Manga with the possibility to react, vote, and save his data.

The objective of this project is to manage The Website Manga, this site permits to Client to show, read and download Manga with the possibility to react, vote, and save his data.

Reda Ennakouri 5 Nov 23, 2022
Simple searching for postcodes to retrieve geographic information. Support for various API providers and a unified address/output format.

Postcode Search Simple searching for postcodes to retrieve geographic information. Support for various API providers and a unified address/output form

Gary Green 10 Nov 29, 2022
CRUD php application to check in and check out employees and show daily building occupation

CRUD php application to check in and check out employees and show daily building occupation. Employees are required to self check their temperature and tick a checkbox to specify whether their temperature is below 38°C else they are invited to stay home. (Implemented in php with bootstrap4 for styling and datatable jquery plugin for table formatting and additional features).

null 2 Feb 20, 2022
CheckIP - A composer module to retrieve information from an IP address

A composer module to retrieve information from an IP address, using geoplugin.net Installation Use composer to install CheckIP composer requir

IsMyStore 1 Aug 9, 2022
A self hosted download manager for movie and tv show trailers.

Introduction Trailarr is a self hosted download manager for movie and tv show trailers. Features: A beautiful, easy to use UI. Easy setup, readily con

null 13 Dec 19, 2022
Livewire component to show records according to their current status

Livewire Status Board Livewire component to show records/data according to their current status Preview Installation You can install the package via c

Andrés Santibáñez 288 Dec 24, 2022
VMControl - Control your VirtualBox VMs from a web browser

VMControl - Control your VirtualBox VMs from a web browser Requirements Microsoft Windows XP or newer Oracle VM VirtualBox VBoxManage (included in Vir

null 1 Nov 6, 2021
Rafa Cake and Bakery is a web-based application project that aims to introduce Rafa Cake and Bakery, introduce what products are sold and can also order them via Whatsapp.

Rafa-cake-and-bakery Rafa Cake and Bakery is a web-based application project that aims to introduce Rafa Cake and Bakery, introduce what products are

Aan Evian Nanda 2 Jun 19, 2022
The API & platform builder, build your apps 10x faster even more, it's open source & 100% free !

The API & platform builder, build your apps 10x faster, even more. It's open source & 100% free ! Try live demo Why badaso ? 100% FREE - No need for e

Uasoft 1k Jan 2, 2023
Provides an API wrapper for interacting with remote CiviCRM instances via APIv4.

civicrm-api is a Composer package that allows developers to interact with a CiviCRM instance using the REST API v4 functionality within CiviCRM.

Circle Interactive 1 Apr 4, 2022