kanekescom/laravel-siasn-api

A Laravel package for seamless integration with the SIASN REST API
2,680 4
Install
composer require kanekescom/laravel-siasn-api
Latest Version:v2.0.21
PHP:^8.2
Laravel:10 · 11
Older releases:8 · 9
License:MIT
Last Updated:Oct 7, 2026
Links: GitHub  ·  Packagist
Maintainer: kanekescom

Laravel SIASN API

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A Laravel package for seamless integration with the SIASN REST API. This library is the abstraction of SIASN API for access from applications written with Laravel PHP Framework.

Support Us

Want to provide tangible support? Use the following platforms to contribute to open-source software development:

Your support is greatly appreciated!

Installation

Install the package via Composer:

composer require kanekescom/laravel-siasn-api

Publish the config file:

php artisan vendor:publish --tag="siasn-api-config"

Or complete all installations with:

php artisan siasn-api:install

Usage

Token Generator

Generate APIM Token:

php artisan siasn:apim-token

Generate SSO Token:

php artisan siasn:sso-token

Generate both APIM and SSO Tokens:

php artisan siasn:token

Use --fresh to always request a new token.

Remove Tokens

php artisan siasn:forget-token

Available Token Methods

use Kanekes\Siasn\Api\Credentials\Token;

Token::getNewApimToken(); // Always request a new APIM token
Token::getApimToken(); // Request APIM token

Token::getNewSsoToken(); // Always request a new SSO token
Token::getSsoToken(); // Request SSO token

Token::forget(); // Remove APIM and SSO tokens

Send a Request Using Commands

GET Request:
php artisan siasn:get {endpoint}

Example:

php artisan siasn:get https://apimws.bkn.go.id:8243/apisiasn/1.0/referensi/ref-unor
POST Request:
php artisan siasn:post {endpoint}

Send a Request Using Class

The Siasn class uses Laravel's Http class (Illuminate\Support\Facades\Http):

use Kanekes\Siasn\Api\Facades\Siasn;

Siasn::get($endpoint, $params);

For dual authentication (SSO), use:

use Kanekes\Siasn\Api\Facades\Siasn;

Siasn::withSso()->get($endpoint, $params);

Testing

composer test

Our Other Cool Packages

Referensi APIs

SIASNAPI-SIMPEG APIs

Changelog

See CHANGELOG for recent updates.

Contributing

See CONTRIBUTING for contribution guidelines.

Security Vulnerabilities

See our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). See License File for details.

Related Packages

kanekescom/laravel-lingo

Laravel package to manage, sync, and analyze JSON translation files

1,366 1
railken/lara-eye
38,915 39
api
juampi92/api-resources

Manage your resources maintaining API versioning

934,433 111
tailflow/laravel-orion

Orion for Laravel allows you to build a fully featured REST API based on your El...

795,245 1,593

Version History

Version Released PHP Laravel License
v2.0.21 ^8.2 ^10.0||^11.0 MIT
v2.0.20 ^8.2 ^10.0||^11.0 MIT
v2.0.19 ^8.2 ^10.0||^11.0 MIT
v2.0.18 ^8.2 ^10.0||^11.0 MIT
v2.0.17 ^8.2 ^10.0||^11.0 MIT