cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

IRPA API Trigger - Invalid API Key

Former Member
3,083

Hi All,

I created an API trigger for my IRPA Deployment. I followed the SAP Help document and tested the post URL using POSTMAN and it started a job and I could see it on the Cloud Factory. I copied the code generated by POSTMAN and tried using it in an AJAX call in my UI5 app so that I can start a job through my UI5 App. I get this error "status: 403, code: "SAP_IPA_12019", severity: "ERROR", message: "The API key is invalid."

What could I be doing wrong here?

Thanks in advance!

Best Regards

TP

Accepted Solutions (1)

Accepted Solutions (1)

Hi Teena,

my colleague Pavel might have a solution for you:

Please put the “irpa-trigger-token” in the body (instead of the header) as follows:

{

"irpaTriggerToken": "xxxxxxxxxxxxxxxxxxxx"

}

I think the problem lies with the Destination Service – it does not transmit the header.

Please let me know if this doesn’t work and we will look for another solution.

Best Regards

Christoph

Former Member
0 Likes

Hi Christoph,

Yes it works! Thanks a lot for your help :).

Best Regards

TP

Answers (4)

Answers (4)

christianehresmann
Discoverer
0 Likes

Hello christoph.gross,

putting the irpa-trigger-token in the body worked for me as well, when I tested it manually via Postman. However I got another error in my UI5 Application when I try to fetch the token.

I configured the following destination to the token endpoint.

Then I referenced that in my neo-app.json and implemented an ajax call in my code.

When I run the application I get the following error message:

Do you have any suggestions why it is not working. I assume that the grant_type "client_credentials" is correctly specified?

Thanks in advance and best regards

Christian

0 Likes

Hi TP,

could you try to generate a new irpa trigger token? It seems your current one is invalid.

To do this just edit your trigger and click on the "Generate new token" button

2020-02-07-14-29-44-sap-intelligent-robotic-proces.png(75.9 kB)

Former Member
0 Likes

Hi Cristoph,

I tried this too assuming that was the problem. Didn't work!! With the same irpa token I was able to start the bot in POSTMAN.

Thanks for your answer!

Best,

TP

Former Member
0 Likes

Hi Mark Teichmann,

Thanks a lot for your quick response. My answer to all your questions is yes.

Here is my AJAX call:

and Here is how I set the destination:

Network:

I trigger the call from my UI5 App .

Before this attempt of copying the code generated by POSTMAN, I first tried fetching the token in my program and passing it to the POST ajax call. I received the token, but received the same error for the trigger API.

The destination for this call is as below:

My app is running in my actual account and I created the IRPA stuff from my trial account. Don't know if that matters..

Hope you can find a problem in my code and give me the solution :).

Thanks a lot in advance!

Best Regards

TP

Mark_Teichmann
Contributor
0 Likes

Hi TP

first I would double check that the API key really matches the one you used in POSTMAN. Maybe while copying you missed a character or added a SPACE somewhere?

If that is not the reason, is the OAuth authentication working or are you already getting the 403 error here? Do you ave the Header field irpa-trigger-token in your call? Is the Content-type set to application-json? Can you provide your code of the AJAX call to check if something is missing?