"error": "request is invalid, reason: failed authorization. Please use a valid user token for this SPA". | Community
Skip to main content
Level 3
March 10, 2021
Question

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

  • March 10, 2021
  • 6 replies
  • 3213 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

6 replies

Adobe Employee
March 10, 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"
 

 

Adobe Employee
March 11, 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#action-authentication-errors. Hope it is helpful!

Adobe Employee
March 11, 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-request-is-invalid-reason-failed/qaq-p/399607 ?

 

Adobe Employee
March 15, 2021

Did you figure out the issue?

deepakkvAuthor
Level 3
March 17, 2021

@dbenge  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 ?

Adobe Employee
March 22, 2021
did you get past the issue?
Adobe Employee
March 17, 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?