keenlabs / keen-sdk-net

A .NET SDK for the Keen IO API
MIT License
37 stars 23 forks source link

EncryptString Produces Invalid Scoped Key #34

Closed nariman-haghighi closed 7 years ago

nariman-haghighi commented 8 years ago

We previously relied on EncryptString but discovered that the changes in dc77ea84dc37624ec6bbdbf4508a3d99fd29a5e8 produced an invalid key: {"message": "Specified API Key is invalid. API Key: '....', "error_code": "InvalidApiKeyError"}

The same string value passed as an object to Encrypt appears to work.

Keen.Core.ScopedKey.Encrypt(key, Newtonsoft.Json.Linq.JObject.Parse(json)) and Keen.Core.ScopedKey.EncryptString(key, json) should match but only the former is producing a valid key at the moment.

tbarn commented 8 years ago

Hey @nariman-haghighi! We looked a bit more into this and it looks like it is an API bug, not .NET SDK bug. Hopefully we will be fixing it soon!

masojus commented 7 years ago

Fixed in commit 0b08716.