Access denied, C# Code Sample

I am following the example code (General ledger, specifically Journal entry batch) as shown in the image, however the Access Denied problem, the token has been updated, I don't know what the problem is.