Relative Content

Tag Archive for javaspringspring-bootopenai-apihttp-status-code-403

Endpoint returning 403 after successfully executing (Spring Boot)

I made an endpoint “/api/chat” that, when called, makes another request to the OpenAI API (paid for and API key valid, all that). When testing the endpoint in Postman, I first request my /auth/login endpoint to get a valid JWT login token, copy that for the Authorization header of my /api/chat call, then send it (The login auth token is 100% valid, and works perfectly for all other endpoints as well).