ariznaf  
                
                  
                    January 14, 2022,  6:17pm
                   
                  1 
               
             
            
              We use API calls from an external program to create some topics authomatically.
We now want to change authomatically the logo image of some categories, extracting the image from some posts previously created in discourse.
But in the API documentation we could find no option to set the logo image of categories, just color, name or text color.Discourse API Docs 
Is there a way to do that?
Thanks in advance.
             
            
              1 Like 
            
            
           
          
            
              
                pfaffman  
              
                  
                    January 14, 2022,  7:28pm
                   
                  2 
               
             
            
              The best documentation for the API is discourse. See How to reverse engineer the Discourse API 
             
            
              4 Likes 
            
            
           
          
            
              
                ariznaf  
              
                  
                    January 15, 2022,  7:09am
                   
                  3 
               
             
            
              Thank you, I will have a more in depth look.
The problem I am having is that there is no PUT method to set the logo.
There is a POST method where you can stablish all the cateory properties.
But that POST method is for creating a category, not for updating it and change the category properties.
             
            
              1 Like 
            
            
           
          
            
              
                ariznaf  
              
                  
                    January 15, 2022, 10:20am
                   
                  5 
               
             
            
              thanks a lot.
I have been trying to reverse engineer it using the developer tools of browser.
Yes it seems that you first use uploads.json to upload it.
I our case the image is already in the system, as it is a photo embeded in a post, so I imagen we can get the id from the post.
And the you just need to use the PUT method to https://foro.ojodigital.com/categories/{cat_id} ?
Thans, will try.
             
            
              3 Likes 
            
            
           
          
            
              
                fzngagan  
              
                  
                    January 15, 2022,  2:27pm
                   
                  6 
               
             
            
              
i would expect it to work that way.
             
            
              5 Likes 
            
            
           
          
            
              
                ariznaf  
              
                  
                    January 15, 2022,  5:08pm
                   
                  7 
               
             
            
              Thanks  we will try, I will talk with the programmer.
             
            
              2 Likes 
            
            
           
          
            
              
                mattdm  
              
                  
                    January 16, 2022,  1:53pm
                   
                  8 
               
             
            
              See
  
  
    Sure, the included badges are … nice. Nothing wrong with them at all. But, what if you want more? What if you want to go beyond the pre-defined symbol set? Sure, there’s an admin page where you can upload them. But what if you want to make a whole lot of badges ? 
Well, good news! You can do this through the API. Here’s Python code showing how it works. (And it awards the badge at the end, for good measure.) 
This should be pretty easy to read even if you’re not a Python programmer. You can even …
   
 
for an example of using the new image upload API in Discourse. It’s for a different purpose but the same probably applies.
             
            
              1 Like