If I need to import keys from my current api solution, I have two questions.
- Does the functionality exist to so within the gateway/dashboard?
- Or is it best to do it using the rest api? If so can someone point me to the docs or proper syntax for doing so?
The best thing to do would be to use the API, and use the Add key method. Basically, within Tyk you can create custom tokens (for exactly the purpose you describe) instead of having generative ones, although these will not be manageable via the gateway except via a super-user (this has to do with the multi-tenant nature of Tyk). We’d suggest slowly migrating across to Tyk-generated tokens over time.
Adding a new token to tyk is really easy, see the “Add/Update Keys” call here
To get your head around the object that gets sent along with a token, it’s got a full run-down here
Let us know how you get on