Add field in admin section and link to shop

Hello,

I’m developing a Shopify application that interoperates with an external service via an API. To identify which shop the request comes from, I need to send a token to my API.

My idea was to add a field in the admin menu to allow the shop manager to add the token.

I have two questions:

  1. How can I add this field (text) to the admin menu to allow the manager to enter/modify the token? And as a result, I need to save it somehow.
  2. How can I retrieve my token from the shop (via an extension) so that I can make my API calls correctly?

Thanks for your help !

Mathieu