Get 403 forbidden when i create milestone

17 views
Skip to first unread message

yao.g...@gloritysolutions.com

unread,
Mar 17, 2015, 3:15:15 AM3/17/15
to assembla...@googlegroups.com
when i use 

POST /v1/spaces/:space_id/milestones


to create a milestone i have receive 403 forbidden.

But i can create milestone manaully.

i also can post comment. Here is my java code ; 

/**
     * get application header map
     */
    private Map<String, String> getApplicationHeaderMap() {
        Map<String, String> headerMap = new HashMap<String, String>();
        headerMap.put("Accept", "application/xml");
        headerMap.put("Content-Type", "application/xml");
        headerMap.put("X-Api-Key", getApiKey());
        headerMap.put("X-Api-Secret", getApiKeySecret());
        return headerMap;
    }


        

public void createMilestone(String spaceName, String milestoneName) throws ConnectorException {
        String url = "https://api.assembla.com/v1/spaces/"+ spaceName + "/milestones.xml";
        String milestoneXml = "<milestone><title>testMilestone</title></milestone>";
        String xmlContent = connector.doPost(url, new StringEntity(milestoneXml , "UTF-8");, getApplicationHeaderMap());
    }



com.glority.common.connectors.ConnectorException: Error response: HTTP/1.1 403 Forbidden
at com.glority.common.connectors.http.HttpConnector.doRequest(HttpConnector.java:371)
at com.glority.common.connectors.http.HttpConnector.doPost(HttpConnector.java:206)
at com.glority.common.connectors.assembla.AssemblaConnector.createMilestone(AssemblaConnector.java:1273)

Stanislav Kolotinskiy

unread,
Mar 20, 2015, 3:13:27 AM3/20/15
to assembla...@googlegroups.com
Hi Yao,

I'm sorry for the delay. Code looks fine - did you try to perform a test curl request with the same credentials and check if it works?

Regards,
Stanislav
--
You received this message because you are subscribed to the Google Groups "Assembla API Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to assembla-api-d...@googlegroups.com.
To post to this group, send email to assembla...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages