OAuth and "User denied access to resource" error

Hi Guys,

We are using OAuth flow and legacy XML-RPC in the .Net web app. We have test account and test application with key. Some time ago link to our test environment is changed, so i updated it in test application Callback URL field. And key for that application has Status: Active.

But when i try to authenticate via OAuth from my app - it asks me about Allow\Deny and after i allow access, it redirects me back with an error and url like this:

https://someUrl/SomePage.aspx?state=&error=access_denied&error_uri=https%3A%2F%2Fdeveloper.infusionsoft.com%2Fdocs%2Fread%2FGetting_Started_With_OAuth2&error_description=User+denied+access+to+resource

My initial OAuth url looks correct: https://signin.infusionsoft.com/app/oauth/authorize?client_id=someKey&response_type=code&scope=full&redirect_uri=https%3A%2F%2FsomeUrl%2FsomePage.aspx

Is it something with my test account? Or i’m missing something?

Thanks.

Hi @Sergey_Litvinov
This will obviously happen when the user that is authorizing access clicks deny, however it will also happen if the user that is logged in doesn’t have access to an Infusionsoft application. The developer application isn’t able to obtain access to the Infusionsoft application from the user because the email address and password that was used can’t be used to access the front end of the Infusionsoft application (active user in an application).

Two things can be done to resolve this error:

  1. The email address that is being logged in with should become an active user on an Infusionsoft application by receiving a user invite as documented here: http://help.infusionsoft.com/userguides/get-started/initial-setup-checklist/invite-and-manage-users
  2. A sandbox application can be setup to test the integration with by going here: Sandbox Application - Keap Developer Portal

To confirm if either of these option will work for you and to verify that this is the issue please go to https://signin.infusionsoft.com/login and login. After logging in you will only see Marketplace. An Infusionsoft Id (email address used to log in) that is connected to an Infusionsoft application will display like this:

2 Likes

Hi John,

That user was listed as user in application itself, but on home page i hadn’t any applications except Marketplace. I followed your 1st suggestion and changed user email, deleted it, and then created new one with original email and now it displays both Marketplace and application and OAuth works fine.

Thanks for the help!