@TangeniShikomba-0824, Thank you for reaching out. For the following error, '{"error":"access_denied","error_description":"This application is not allowed to create application tokens"}, you need to contact the LinkedIn Support to get this fixed.
As mentioned in this article: https://developer.linkedin.com/docs/v2/oauth2-client-credentials-flow
"For certain endpoints we offer OAuth 2.0 application access via the Client Credentials Flow. Commonly referred to as "OAuth two-legged", this flow allows your application to authorize with LinkedIn's API directly - outside the context of any specific user.
By default, your application will not have the ability to use LinkedIn's client credentials flow. Contact us to have your application granted permission to use this flow."
Hope this helps.
Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as Answer; if the above response helped in answering your query.