You can use OAuth2 replaces key and certificate credentials authentication in previous versions of the API.
Please note, at this time, you need to invite a new user to your Apple Search Ads account and provide them one of the API user roles (API Account Manager, API Account Read Only) in order to create and edit an API Public Key in UI. Only these API user roles above are able to create and edit an API Public Key within your Apple Search Ads account.
For more details regarding Apple Search Ads API process, please reference:
Implementing OAuth for the Apple Search Ads API
Note: Apple updated Apple Search Ads API v4
For example:
When you have accessToken try this curl
curl --request GET \
--url https://api.searchads.apple.com/api/v4/me \
--header 'Authorization: Bearer {access_token}' \
--header 'X-AP-Context: orgId={your_orgID}