decoderid / gojek-api-php-native

Gojek Api PHP Native (Unofficial)
https://php-demo.decoder.id/app/gojek/
MIT License
9 stars 4 forks source link
gojek gojek-api php php-library unofficial-api unofficial-library

MIT License Contributors Forks Issues

Hits

Gojek Api Unofficial (PHP NATIVE)

AppVersion: 4.74.3

Gimme Buff to Get More Power: https://trakteer.id/decoderid

Api List

Composer

$ composer require decoderid/gojek-api

Example: Login

<?php
require_once 'vendor/autoload.php';

use Decoderid/GojekApi;

$phone = '[PHONE]';
$pin = '[PIN]';

$gojek = new GojekApi();
$login = $gojek->login($phone, $pin);

/**
 * VERIFY OTP
 */
$verifyOtp = $gojek->verifyOtp('[OTP]', $login->data->otp_token);

if ($verifyOtp->access_token) {
    print_r($verifyOtp);
}

if ($verifyOtp->success) {
    print_r($verifyOtp);
}

/**
 * IF PIN AUTHENTICATION AFTER OTP
 */
if ($verifyOtp->errors[0]->code === 'mfa:customer_send_challenge:challenge_required') {
    $challengeToken = $verifyOtp->errors[0]->details->challenge_token;
    $challengeId = $verifyOtp->errors[0]->details->challenges[0]->gopay_challenge_id;

    $verifyMFA = $gojek->verifyMFA($challengeId, $pin);

    if ($verifyMFA->success) {
        $verifyMFAToken = $gojek->verifyMFAToken($challengeToken, $verifyMFA->data->token);
        print_r($verifyMFAToken);
    }
}

?>

Demo

https://php-demo.decoder.id/app/gojek/

Contact

Email: im@decoder.id

Telegram: @decoderid

Another Project

  1. Dana Unofficial Api
  2. Cek Pajak Kendaraan