Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Persist data between page loads to efficiently reuse API tokens #39

Open
uncheckederror opened this issue Feb 13, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@uncheckederror
Copy link
Contributor

Right now saving the value of an API token to the session in PHP doesn't actually persist that token between page loads. We need to research a solution to this problem.

A call to the login API is made on every send message action executed in WebTexting. Ideally we would hang on to a single token until it expires and then use the refresh token to get a new token.

This issue is a follow up to the work done in #30.

@uncheckederror uncheckederror added enhancement New feature or request help wanted Extra attention is needed labels Feb 13, 2024
@uncheckederror uncheckederror changed the title Persist data between page loads to efficiently reuse API tokens [FEATURE] Persist data between page loads to efficiently reuse API tokens Sep 4, 2024
@dunkeltron
Copy link
Contributor

dunkeltron commented Sep 4, 2024

IIRC the reason we get a new auth token every time we send a message is because the field we are using for auth is stored somewhere in fpbx's default settings. This fpbx default setting ([webtexting][accelerate_networks_inbound_token]) is getting populated from fpbx's db upon fpbx login which prevents persistence of new tokens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants