ably-js icon indicating copy to clipboard operation
ably-js copied to clipboard

History API error: Invalid accessToken in request: xyz.F5UkPAOLTbMV4emxqgxzCb5...

Open Dajust opened this issue 10 months ago • 3 comments

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 ]

┆Issue is synchronized with this Jira Task by Unito

Dajust avatar Apr 21 '24 00:04 Dajust

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.

lawrence-forooghian avatar Apr 22 '24 12:04 lawrence-forooghian

Hey @lawrence-forooghian, thanks for your response. Yes, I am on React Native.

Dajust avatar Apr 22 '24 12:04 Dajust

Thanks for the confirmation. We’re working on a fix.

lawrence-forooghian avatar Apr 22 '24 14:04 lawrence-forooghian

Hi @Dajust ! This issue has been fixed in 2.0.4 release of ably-js. Thank you for reporting this problem!

VeskeR avatar May 03 '24 12:05 VeskeR