Expand my Community achievements bar.

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

Avatar

Level 3

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.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

7 Replies

Avatar

Employee

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"
 

 

Avatar

Employee

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

Level 3

@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

Employee

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?