Get access to users fax - from backend program

Hi.

I want to writing a backend job that retrieves incoming fax for certain users and send them as email. Can any one tell me how I get access to the users inbox from code behind. According to the API I should use a client.setAccessToken("your_access_token") question is how do I create a your_access_token that I can use from code behind?

Hi Torben,

Your access Token is used for authentication when using the sdk. If you do not have an access token this page can explain how to obtain one https://developer.genesys.cloud/authorization/platform-auth/use-client-credentials. Additionally, if you do not have an access token but you do have a OAuth Client Id and Secret you can use those to authenticate yourself. This link shows various methods to authenticate yourself use the OAuth Client Id and Secret https://developer.genesys.cloud/devapps/sdk/javascript#authentication.

Regards,
Declan

1 Like

Hi Torben,

I believe this requires you to be logged in as the specific user to retrieve anything from their inbox. Typically this means that the implicit grant is the easiest method of authentication for the backend app.. but of course that would require the user to sign into an app to provide those credentials.

This is something that is tricky to solve.

Thanks,
Peter

1 Like

I believe that's correct. You would use an implicit grant for client-side apps and the auth code grant for server-side apps. (Or SAML2 Bearer if your using SSO) Both require interaction with the user to get an auth token; there isn't an option to interact with the user's faxes without them authorizing an app to do so.

You can request new features, such as headless app access to users' faxes, and share your use case at https://genesyscloud.ideas.aha.io.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.