There is no feature to modify the payload, but if you API action uses JwtMiddleware, it will login you in so you can get all user info. If you don’t use JwtMiddleware, you can load the user yourself and get all info, e.g.
Thank you . which server event will i use $user = LoadUserByIdentifier($decodedJwt[‘username’]); ? and how can i use JwtMiddleware with this API action $app->get(‘/getcustomerid/{name}’, function ($request, $response, $args) {
$name = $args\["name"\] ?? null; // Get the input value
if ($name !== null){
$response = $response->withJson(ExecuteRows(" SELECT \* FROM pos_product WHERE category_id='" . AdjustSql($name) . "'")); // Select the record by name and return as JSON
}
return $response; // Return Psr\\Http\\Message\\ResponseInterface object
}); for instance