ably-js
ably-js copied to clipboard
History API error: Invalid accessToken in request: xyz.F5UkPAOLTbMV4emxqgxzCb5...
Since v2, I've been getting this invalid accessToken error whenever I call this channel.history()
API.
Note that the same accessToken is used across all other APIs in my app and all work well, except the history API call, so yes, I think my API key is valid. I also tried with a newly created API key but to no avail.
01:04:49.540 Ably: PaginatedResource.handlePage(): Unexpected error getting resource: err = [ErrorInfo: Invalid accessToken in request: xyz.F5UkPAOLTbMV4emxqgxzCb5...; statusCode=400; code=40005; see https://help.ably.io/error/40005 ]
Hi @Dajust, thanks for raising this issue. What environment are you running ably-js in? We've recently received a similar bug report for React Native (https://github.com/ably/ably-js/issues/1730). I think we didn't immediately fix it because the affected user was able to work around the issue, but it sounds like something we should be fixing as a priority.
Hey @lawrence-forooghian, thanks for your response. Yes, I am on React Native.
Thanks for the confirmation. We’re working on a fix.
Hi @Dajust ! This issue has been fixed in 2.0.4 release of ably-js. Thank you for reporting this problem!