bassangler Posted August 5, 2022 Posted August 5, 2022 I'm trying to use an API method using an API key. Do I need to include the key as a query parameter? If all is working correctly, I expect that we should see the results using https://www.domain.com/developers/rest-api?endpoint=forums/posts/GETindex&key=xxxx Although, it seems strange that you would serve the “endpoint” as a query parameter. Also, “GETindex" seems strange. As I read the documentation at https://invisioncommunity.com/developers/rest-api?endpoint=forums/posts/GETindex, I would expect the endpoint “/forums/endpoint” to be directly in the URL. Something like https://www.domain.com/developers/rest-api/forums/posts?key=xxxx. You seem to be trying to mimic the URL of the documentation, but I have no idea what you are doing on your end to serve the endpoint. To be more clear, I expect https://www.domain.com/developers/rest-api to be root of the API. Then the following GET endpoints would serve posts and topics respectively. /forums/posts /forums/topics Since we are using an API key, put that in a query parameter ?key=xxxxx. https://www.domain.com/developers/rest-api/forums/posts?key=xxxx Thoughts?
Marc Posted August 5, 2022 Posted August 5, 2022 If you take a look at the developer guide here. This shows you how you would use the endpoints, and should get you on your way there https://invisioncommunity.com/developers/rest-api
bassangler Posted August 6, 2022 Author Posted August 6, 2022 I did, and that's where I got the information above. Didn't help because it doesn't work. That's why I posted here for help.
Jim M Posted August 6, 2022 Posted August 6, 2022 Believe there is some confusion on the URLs used as those were not referenced. You would take your base URL of your community and add api and then the endpoint. Therefore, if the following is true: Base URL: https://example.com/Endpoint you're accessing: /core/hello Then the URL would be: https://example.com/api/core/hello If your server requires a query string for the API key, you then would tack that on as ?key={insert key} I'm afraid, custom development is outside our scope of support. If you are unsure how to read the documentation, then I would suggest working with a developer. Any further questions on the API, please post in our Developer Forum to receive help from fellow third party developers: https://invisioncommunity.com/forum/504-ips-development-gateway/
Recommended Posts