Closed gobid closed 7 years ago
Then I contacted API support and they said:
Hello,
we are sorry, but there is not enough data in your request for doing detailed investigation. Could you please provide us the following information:
To which I responded:
not possible
POST (this is done by the upwork api python driver)
# this is done after:
client = upwork.Client(UPWORK_KEY, UPWORK_SECRET, oauth_access_token=ACCESS_TOKEN, oauth_access_token_secret=ACCESS_TOKEN_SECRET)
UPWORK_KEY = 'UPWORK_KEY'
UPWORK_SECRET = 'UPWORK_SECRET'
UPWORK_VERIFIER = 'UPWORK_VERIFIER'
ACCESS_TOKEN = 'ACCESS_TOKEN'
ACCESS_TOKEN_SECRET = 'ACCESS_TOKEN_SECRET'
headers are done as part of the upwork api python driver, see https://developers.upwork.com/?lang=python#contracts-and-offers_send-client-offer
see client info above
python 2.7.9
python console
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Users/govindadasu/Desktop/learningdollars/00-ldrest/venv/lib/python2.7/site-packages/upwork/routers/offers.py", line 186, in send_client_offer
return self.post(url, data)
File "/Users/govindadasu/Desktop/learningdollars/00-ldrest/venv/lib/python2.7/site-packages/upwork/namespaces.py", line 37, in post
return self.client.post(self.full_url(url), data)
File "/Users/govindadasu/Desktop/learningdollars/00-ldrest/venv/lib/python2.7/site-packages/upwork/client.py", line 176, in post
return self.read(url, data, method='POST', fmt=self.fmt)
File "/Users/govindadasu/Desktop/learningdollars/00-ldrest/venv/lib/python2.7/site-packages/upwork/client.py", line 290, in read
raise_http_error(url, response)
File "/Users/govindadasu/Desktop/learningdollars/00-ldrest/venv/lib/python2.7/site-packages/upwork/http.py", line 45, in raise_http_error
headers, None)
HTTP403ForbiddenError: HTTP Error 403: Code 403: Duplicate timestamp/nonce combination, possible replay attack. Request rejected.
Note, even though I get a 403, the offer is still made every time.
see above 403
To which they responded:
From the provided information, it seems you are running two requests one by another, therefore, 2nd request fails with 403, because it uses duplicated data. It's either an issue in your script, or you don't use proper timeouts for your requests.
We also didn't found the following info:
What is also confusing - Send offer API returns only an ID of a new offer. Could you please specify which API you used to get milestones, i.e. provide the same detailed information?
To which I responded:
I am using the python driver which is displayed on your developers website. See attached. I do not know the HTTP level information as I'm using your python driver. Could you please provide me help at the python driver level.
@govindad , response from the server is returned by the library 'as is', i.e. it's not sorted on library's side. Please, contact apisupport to clarify all the details related to your particular request.
I am in conversation with API support now. I will post the answer when they provide me the solution.
@govindad , please, let's not confuse other consumers - api responses have nothing to do with the functionality of the library.
It's not even the response that is concerning. It's the fact that the API doesn't order the milestones correctly. I do not know yet whether this is an issue with the API or the driver, but I am finding out.
Try this example https://developers.upwork.com/?lang=python#contracts-and-offers_get-client-offer with an additional third milestone called "description 3" and you'll see exactly what the issue is ... they don't get ordered properly.
I have not worked with the API directly or with any other driver, so I have no idea whether this is a driver issue or an API issue.
Finally, apisupport received the needed details fully. Thus, the concern is not about response or display on GUI, but about 'milestone' parameter in Send Offer API, i.e. possible mix of orders in line https://github.com/upwork/python-upwork/blob/master/upwork/routers/offers.py#L179
We will check the theory as soon as possible.
great to hear you are in communication with them
hi @mnovozhylov do you have any update on this issue?
The issue should be already fixed on backend side. python-upwork
shows
'milestones[0][deposit_amount]': '101',
'milestones[0][due_date]': '03-15-2015',
'milestones[0][milestone_description]': 'description 1',
'milestones[1][deposit_amount]': '102',
'milestones[1][due_date]': '03-18-2015',
'milestones[1][milestone_description]': 'description 2',
'milestones[2][deposit_amount]': '103',
'milestones[2][due_date]': '05-28-2016',
'milestones[2][milestone_description]': 'description 3',
I am using the upwork api to make an offer. I notice the milestones are not getting ordered properly:
PRODUCES the attached file
Please let me know the solution.