I'm not sure i follow how you are generating the keys and what you are doing with the hashes - the hashes aren't really used for anything except to identify a key.
I'm using the hash to get the activity for that key via
GET /activity/keys/<hash>/from/to. I am not explicitly passing an alias, but when I look up the key in the Tyk Dashboard, I'm seeing the user email as the alias.
(btw. searching for a username with the "This is a username" flag on the System Management > Keys page doesn't work for me. I need the unhashed key, which will not be possible in production :/)
I think the problem here is it's unclear on what you are doing, how you have achieved it and then how that leads to whatever confusion there is with keys.
I am doing the following:
- Register developer via
- Request key for a policy via
POST /portal/requests (v2)
- Approve key via
- Since that only returns the RawKey, I then get the hashed token via
GET /portal/developers/<id>. This returns the developer data along with a
subscriptions dictionary, which I use to match the policy I requested the token for (I think you told me to get the key hash this way in another thread on here):
In the test that I just did, I'm getting b88634e9 in step 4. However, the key hash I'm seeing in the Tyk Dashboard > Activity by key, is a613ecc9. The alias displayed with it is the email of the developer I registered in step 1, so it's definitely the key that I mean.
My question is: how do I get the a613ecc9 hash and what is the b88634e9 I'm seeing in step 3?