"error": "request is invalid, reason: failed authorization. Please use a valid user token for this SPA".

Avatar

Avatar

deepakkv

Avatar

deepakkv

deepakkv

09-03-2021

I have created a Adobe IO runtime project based on firefly template for fetching the profiles from the campaign. But when i am trying to invoke the action , it showing the below error.

 

"error": "request is invalid, reason: failed authorization. Please use a valid user token for this SPA".

 

Could you please help me to resolve this issue ?

 

Thanks in advance.

Accepted Solutions (0)

Answers (6)

Answers (6)

Avatar

Avatar

dr_venture

Employee

Avatar

dr_venture

Employee

dr_venture
Employee

17-03-2021

With a page hosted at Adobe it will auto pass through your auth into the Action.

This may seem like a silly question but do you have multiple orgs your a member of? If yes then in the right hand corner of your app page do you have the same org selected that the project was created in? 

 

Avatar

Avatar

deepakkv

Avatar

deepakkv

deepakkv

17-03-2021

@dr_venture  here I am using Adobe hosted default page to invoke the action. in my under standing , I hope in this situation the headers will automatically pickup. But some how it is not happening and I am still facing the issue.
Please let me if you have any possible for this ?

Or I am missing something ?

Avatar

Avatar

dr_venture

Employee

Avatar

dr_venture

Employee

dr_venture
Employee

15-03-2021

Did you figure out the issue?

Avatar

Avatar

dr_venture

Employee

Avatar

dr_venture

Employee

dr_venture
Employee

11-03-2021

How are you trying to invoke the Action? Postman, localhost default app, adobe hosted default app? There are different tips and things to check for based on how you are interacting with it. 

 

Is this the same question as https://experienceleaguecommunities.adobe.com/t5/project-firefly-questions/quot-error-quot-quot-requ... ?

 

Avatar

Avatar

duypnguyen

Employee

Avatar

duypnguyen

Employee

duypnguyen
Employee

11-03-2021

@deepakkv - Here are some more details on troubleshooting the error you mentioned: https://github.com/AdobeDocs/project-firefly/blob/master/getting_started/common_troubleshooting.md#a.... Hope it is helpful!

Avatar

Avatar

dr_venture

Employee

Avatar

dr_venture

Employee

dr_venture
Employee

10-03-2021

Could you tell me more about how you are trying to invoke the Action?

Are you using the localhost hosted default web page to select the Action and invoke it? Or are you using the Adobe hosted default page to invoke the action?  or are you trying to invoke from a custom UI you built?

 

Here is a little 101 data for you in the meantime.

Actions you build will require Adobe auth is passed to them in the header on every invocation unless you set "

require-adobe-auth: false" in the manifest.yml for your project.   
The required call auth headers are 
"authorization": "Bearer eyJhUSERS_AUTH_TOKEN_HERE_1...."
and
 
If you don't know your org_id use this command "aio config get project.org.ims_org_id" and it will be in the output
YOUR current auth token can found with this command "aio auth login"