AP.request is for making calls to the Atlassian application. To call yourself - you can use whatever you want. How you want to secure the call - that’s up to you as well.
What I do is to use jQuery (yes I haven’t switched to react yet) and use a jwt token that I sent down in the initial html page as the authentication token. Then I can verify the jwt token was sent from me on my call (using add-on.checkValidToken() ). For more details - see “How to send a signed HTTP request from the iframe back to the add-on service” at Bitbucket .
In our connect add-on, have added the same code. But cannot access the data, as 401 error code is thrown when using addon.checkValidToken(). Here is my server side code,