OAuth Keys Quick Reference

Third Pary Access Guide

getFuelLevies API Authentication Implementation Guide

Overview

This guide provides step-by-step instructions for implementing OAuth 2.0 authentication on the getFuelLevies API endpoint using Laravel Passport, which is already configured in your project.

Current Status

Implementation Steps

Step 1: Add Fuel Levy Scope to OAuth System

1.1 Update AuthServiceProvider.php

Add a new scope for fuel levy access:

// File: app/Providers/AuthServiceProvider.phpPassport::tokensCan([
    //define the client scopes    'consignment.read' => "Retrieve a list of your Consignments",    'consignment.write' => "Create or Update a Consignment",    'consignment.status' => "Check a Consignment's status",    'consignment.upload' => "Upload a file related to a Consignment",    'fuel-levy.read' => "Retrieve fuel levy information"  // ADD THIS LINE]);

Step 2: Secure the getFuelLevies Route

2.1 Update the Route Definition

Modify the route in routes/api/tms.php at line 1288:

Current:

Route::get('getFuelLevies','FuelLevyController@getFuelLevies');