Expand my Community achievements bar.

SOLVED

Getting the error "Error in Getting Access Token" while integrating CQ5 with Salesforce

Avatar

Level 1
Level 1

I followed the steps as per the article "Integrating with Salesforce" to integrate CQ5 with salesforce, but I am getting the error "Error in Getting Access Token".

"maruthid" also faced this issue and raised his question in "Integrating CQ and salesforce and possible options" on December 30, 2013, but didn't get any response.

Please help me if someone knows a solution for this. Your help would be greatly appreciated.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

I was not getting the same error as you, but I checked my settings for a test app I had created, and found that I would get an "invalid_grant" error in Cloud Services configuration with some OAuth Scope configurations set for my test app.

 

One of these two configurations seemed to be required for it to work and connect properly into AEM (or into anything else).

[img]api-access.png[/img]

[img]full-access.png[/img]

 

You can certainly select more (even all) of the available OAuth Scopes, and it should continue to work (it did for me).

 

Let us know if that works for you. Assuming it does, we can get the documentation updated to be more clear about what minimum OAuth Scopes are required.

View solution in original post

4 Replies

Avatar

Correct answer by
Former Community Member

I was not getting the same error as you, but I checked my settings for a test app I had created, and found that I would get an "invalid_grant" error in Cloud Services configuration with some OAuth Scope configurations set for my test app.

 

One of these two configurations seemed to be required for it to work and connect properly into AEM (or into anything else).

[img]api-access.png[/img]

[img]full-access.png[/img]

 

You can certainly select more (even all) of the available OAuth Scopes, and it should continue to work (it did for me).

 

Let us know if that works for you. Assuming it does, we can get the documentation updated to be more clear about what minimum OAuth Scopes are required.

Avatar

Level 5

Have you added the instanceUrl in the configuration node. Also OAuth scope should include refresh_token in your SF App.

Regards

Avatar

Level 1
Level 1

Thanks for your response. I tried the configurations as you suggested but no luck. Getting the same error.

Avatar

Level 4

HI,

I have IP relaxation and selected all scope in Connected APP. but still getting Invalid_token error

{"error":"invalid_grant","error_description":"expired authorization code"}

You got working with Any AEM version?

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----