Error scheduling meeting: {"code":124,"message":"Invalid access token."}

Error scheduling meeting: {“code”:124,“message”:“Invalid access token.”}
not sure what i am missing.

I am adding required scope from Scope List.
Getting Auth Token successfully.But when creaeting meetinh link, getting above error
I have tried everything but not solution.

String accessToken = ZoomMeetingScheduler.getAccessToken();
String apiUrl = /users/me/meetings
String startTime = appointment.Requested_DateTime__c.addHours(1).format(‘yyyy-MM-dd'T'HH:mm:ss'Z'’);
system.debug(‘accessToken :::’+accessToken );
HttpRequest req = new HttpRequest();
req.setEndpoint(apiUrl);
req.setMethod(‘POST’);
req.setHeader(‘Authorization’, 'Bearer ’ + accessToken);
req.setHeader(‘Content-Type’, ‘application/json’);

Map<String, Object> meetingDetails = new Map<String, Object>{
    'topic' => appointment.Subject__c,
    'type' => 2,
    'start_time' => startTime,
    'duration' => 60,
    'timezone' => 'UTC',
    'agenda' => appointment.Meeting_Notes__c,
    'settings' => new Map<String, Object>{
        'host_video' => true,
        'participant_video' => true
    }
};

req.setBody(JSON.serialize(meetingDetails));

Http http = new Http();
HttpResponse res = http.send(req);

How recently did you request that access token? The token lifetime should be disclosed when you receive it, and it might expire after 1 hour. Basically, I’m wondering what ZoomMeetingScheduler.getAccessToken() does in your code snippet — perhaps it’s using a previously-retrieved token without checking for its expiration.

Thanks for replying Christopher
In the same transaction i m retrieving and using the token.

Zoom access tokens generated through OAuth 2.0 expire 1 hour (3600 seconds) after they are issued but i am using immediately.

Also i have given all possible Scope. But no solution

Here is snippet written in Salesforce

public static String getAccessToken() {
String clientId = ‘CLIENT_ID’;
String clientSecret = ‘CLIENT_SECRET’;
String credentials = clientId + ‘:’ + clientSecret;
String encodedCredentials = EncodingUtil.base64Encode(Blob.valueOf(credentials));

    HttpRequest req = new HttpRequest();
    req.setEndpoint('https://zoom.us/oauth/token');
    req.setMethod('POST');
    req.setHeader('Authorization', 'Basic ' + encodedCredentials);
    req.setHeader('Content-Type', 'application/x-www-form-urlencoded');
    req.setBody('grant_type=client_credentials');

    Http http = new Http();
    HttpResponse res = http.send(req);

    if (res.getStatusCode() == 200) {
        Map<String, Object> responseBody = (Map<String, Object>) JSON.deserializeUntyped(res.getBody());
        return (String) responseBody.get('access_token');
    } else {
        System.debug('Failed to get access token: ' + res.getBody());
        throw new CalloutException('Error: Unable to fetch access token.');
    }
}

You might try appending &account_id=<your account id> to the above line. Additionally, if that doesn’t solve it, keep the account id addition but change the grant type to “account_credentials”