originstamptimestamping / originstamp-client-python Goto Github PK
View Code? Open in Web Editor NEWPython Client for the OriginStamp service
License: MIT License
Python Client for the OriginStamp service
License: MIT License
I used the example code from the documentation as shown below. This results in ApiExecption (400) error.
api_instance = originstamp_client.TimestampApi()
authorization = API_KEY
notification = originstamp_client.Notification(currency=0, notification_type=0, target=EMAIL)
timestamp_request = originstamp_client.TimestampRequest(comment=COMMENT, hash=h, notifications=notification) # TimestampRequest | DTO for the hash submission. Add all relevant information concerning your hash submission.
try:
# Submission
api_response = api_instance.create_timestamp(authorization, timestamp_request)
except ApiException as e:
print("Exception when calling TimestampApi->create_timestamp: %s\n" % e)
results in
Exception when calling TimestampApi->create_timestamp: (400)
Reason:
HTTP response headers: HTTPHeaderDict({'Expect-CT': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', 'Content-Length': '0', 'Server': 'cloudflare', 'Date': 'Mon, 06 May 2019 10:45:43 GMT', 'CF-RAY': '4d2a5dc3c98497e4-FRA', 'Connection': 'keep-alive', 'Set-Cookie': '__cfduid=dafd9f66a2e3bc643ac630b2887278f241557139543; expires=Tue, 05-May-20 10:45:43 GMT; path=/; domain=.originstamp.com; HttpOnly'})
i copied the data used inside the api to run a request with curl which gives the same error
curl -d "{'notifications': {'notification_type': 0, 'currency': 0, 'target': '***'}, 'comment': 'test', 'hash': '53a31bc8d49c23f54116ca2786f4f78bfa8e64b08a95a6e4e6981cec240053c1'}" -H "Authorization: ****" -H "Content-Type: application/json" -H"User-Agent: Swagger-Codegen/1.0.0/python" -H"Accept: application/json" -v https://api.originstamp.com/v3/timestamp/create
* Trying 104.18.38.26...
* Connected to api.originstamp.com (104.18.38.26) port 443 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 597 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_ECDSA_AES_128_GCM_SHA256
* server certificate verification OK
* server certificate status verification SKIPPED
* common name: sni190452.cloudflaressl.com (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: EC
* certificate version: #3
* subject: OU=Domain Control Validated,OU=PositiveSSL Multi-Domain,CN=sni190452.cloudflaressl.com
* start date: Fri, 03 May 2019 00:00:00 GMT
* expire date: Sat, 09 Nov 2019 23:59:59 GMT
* issuer: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO ECC Domain Validation Secure Server CA 2
* compression: NULL
* ALPN, server accepted to use http/1.1
> POST /v3/timestamp/create HTTP/1.1
> Host: api.originstamp.com
> Authorization: ****
> Content-Type: application/json
> User-Agent: Swagger-Codegen/1.0.0/python
> Accept: application/json
> Content-Length: 187
>
* upload completely sent off: 187 out of 187 bytes
< HTTP/1.1 400
< Date: Mon, 06 May 2019 10:39:36 GMT
< Content-Length: 0
< Connection: keep-alive
< Set-Cookie: __cfduid=d162c80df244f3b1002b0370aacecd90f1557139176; expires=Tue, 05-May-20 10:39:36 GMT; path=/; domain=.originstamp.com; HttpOnly
< Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< Server: cloudflare
< CF-RAY: 4d2a54cceb13c2fe-FRA
<
* Connection #0 to host api.originstamp.com left intact
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.