403 Forbidden error when running API custom action in AJO | Community
Skip to main content
Level 6
November 2, 2023
Solved

403 Forbidden error when running API custom action in AJO

  • November 2, 2023
  • 3 replies
  • 2221 views

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!!

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

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

3 replies

SatheeskannaK
Community Advisor
Community Advisor
November 2, 2023

@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
akwanklAuthor
Level 6
November 2, 2023
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:

 

_Manoj_Kumar_
Community Advisor
Community Advisor
November 13, 2023

Try adding Accept to the request headers.

Accept: application/json 

 

     Manoj     Find me on LinkedIn
akwanklAuthorAccepted solution
Level 6
November 13, 2023

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