Skip to main content

APIs
APIs
12 followers
21 questions
4 posts

Do you have questions about APIs?

Log in to ask questions about APIs publicly or anonymously.

Hi Eddie,

CORS (Cross-Origin Resource Sharing) is a mechanism by which data or any other resource of a site could be shared intentionally to a third party website when there is a need. Generally, access to resources that are residing in a third party site is restricted by the browser clients for security purposes. Although you may not notice it, the web pages you visit make frequent requests to load assets like images, fonts, and more, from many different places across the Internet. If these requests for assets go unchecked, the security of your browser may be at risk. For example, your browser may be subject to hijacking, or your browser might blindly download malicious code. As a result, many modern browsers follow security policies to mitigate such risks.

Here at Tribe, By default we don’t let other domains to send frontend AJAX requests to our customer community’s API endpoints. This will prevent third party sites to identify information about the logged in user in the community. In some cases, our clients have a trusted domain (e.g. their product domain) and they want to send API requests from frontend to their community. In these cases, we’ll add the origin domain/address to CORS whitelist. This means that the community will accept AJAX requests from that particular root address. This does not have any security implications since the origin is a trusted address and is controlled only by our customer.

In order to get an origin whitelisted, Customers need to contact us... (More)

Answer
APIs

Hi Adrian,

 

Please find different API error codes that Tribe uses: -

Error CodeMeaning
400Bad Request -- Your request is invalid.
401Unauthorized -- Your API key is wrong.
403Forbidden -- The requested item is hidden for administrators only.
404Not Found -- The requested item could not be found.
405Method Not Allowed -- You tried to access an endpoint with an invalid method.
410Gone -- The item requested has been removed from our servers.
429Too Many Requests -- You're sending too many requests!
500Internal Server Error -- We had a problem with our server. Try again later.
503Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

 

To know more about different errors, you can visit- https://docs.tribe.so/#errors7

Hi Frances,

Thank you for your question! Please find the detailed information below: -

  1. First step would be to authenticate your access and there are several ways how that can be achieved. To know more about, please refer to our article “Authentication using Tribe API” by clicking here6.
  2. Once your access is authenticated, it will generate an access token.
  3. Once you have the access token, copy it and add it to the header. Please find the format below: -

   Key                              Value                  
 Authorization                   Bearer<space>Access token 

How to migrate content  to your Tribe community using API?

     

     4. Once added, please move to the “raw” section under Body and select JSON format. Once selected, add            the following parameters in JSON format: -

{

 "title": "The title of the post "

"content": "The content of the post "

"type": "The type of the post(post, question, discussion"

}

How to migrate content  to your Tribe community using API?

    

    5. Lastly, select “POST” as the request type and insert “https://Your-community-URL/api/v1/users”9                       (Replace “Your-community-URL” with your own community URL)  

    6. Once you hit send, and if you followed all the steps, it will create a user for you with the status “200 OK”

 

Here are some of the optional fields that you can use basis your needs : -

ParameterTypeDescription
imagesArrayAn array of urls pointing to the images attached to this post (Only works with simple post type)
filesArrayAn array of urls pointing to the files attached to this post (Only works with simple post type)
parentStringThe ID of the parent post
replyToStringThe ID of the post to reply
groupStringThe ID of the group to post


If you receive an error code, you can read about it, here- Error Codes10
 

To know about several other API endpoints, please click here4

Answer
APIs

Hi Kenneth,

You can filter your user based on their unique id or username. To know more about our APIs, please visit- https://docs.tribe.so/6