Expand my Community achievements bar.

Join us for the Adobe Journey Optimizer Community Q&A Coffee Break on 4th September at 8 am PT with Journey Optimizer experts Aaron Forest, Justin Grover, Keara Fausett and Sandra Hausmann.
SOLVED

403 Forbidden error when running API custom action in AJO

Avatar

Level 7

Hi there,

 

We are trying to send a signal over to a 3rd party app to delivery SMS. There are two primary steps: 1) Fetching an OAuth Token, setting the client id and secret, and then putting the token into the Header as part of the API call, this call works in Postman.

 

But when I replicate the same settings into AJO, i get a 403 Forbidden error. Is there anything special I need to configure on the AJO in addition? Things I can confirm:

1) The endpoint is the same between Postman and AJO

2) Authentication returns "Test successful", and I also have this  "tokenInResponse": "json://access_token" in the payload

3) The Payload request is directly copied from Postman.

 

Any advices would be appreciated. Thank you!!

1 Accepted Solution

Avatar

Correct answer by
Level 7

Thanks all. Issue happened to be with my company's own gateway config. It is resolved now!

View solution in original post

4 Replies

Avatar

Community Advisor

@akwankl It should work when it's working on the postman. Can you check for any additional headers you need to include as part of the custom action by comparing the headers that you have on the postman for the same API endpoint? 

Thanks, Sathees

Avatar

Level 7
The headers are the same, it's actually pretty simple.
 
POSTMAN (working):
curl --location 'https://' \
--header 'Content-Type: application/json' \
--header 'Charset: UTF-8' \
--data-raw '{
    <body>
}'
 
 AJO:
akwankl_0-1698956518044.png

 

Avatar

Community Advisor

Try adding Accept to the request headers.

Accept: application/json 

 


     Manoj
     Find me on LinkedIn

Avatar

Correct answer by
Level 7

Thanks all. Issue happened to be with my company's own gateway config. It is resolved now!