Code Monkey home page Code Monkey logo

Comments (10)

DenBond7 avatar DenBond7 commented on July 24, 2024

2017-07-11_16-48-56

from flowcrypt-android.

DenBond7 avatar DenBond7 commented on July 24, 2024

Attester calls

  • POST /test/welcome # Send a welcome test email
  • POST /initial/request # Request initial pubkey attest
  • POST /initial/confirm # Confirm initial pubkey validation
  • POST /lookup/email # Find a pubkey for email address
  • POST /replace/request # Request a pubkey replacement
  • POST /replace/confirm # Confirm a pubkey replacement

Api calls

  • POST /link/message # Get URL of message data based on short
  • POST /account/subscribe # Subscribe to a premium account
  • POST /account/login # Log in or Register a new account
  • POST /message/confirm_files # Confirm submission of files to s3
  • POST /message/upload # Store a message if it cannot be sent through email provider
  • POST /message/token # Get a token that recipients can use to reply on the web
  • POST /message/presign_files # Get pre-signed approvals to POST attachments onto s3 bucket
  • POST /help/uninstall # User just uninstalled a client app
  • POST /help/feedback # Send feedback to devs

from flowcrypt-android.

tomholub avatar tomholub commented on July 24, 2024

You will be getting the results in the desired format when you add a header: api-version: 3

curl -X POST \
  https://attester.cryptup.io/lookup/email \
  -H 'api-version: 3' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 4085d702-a55b-7f86-9356-aff1753f0d60' \
  -d '{
    "email": null
}'

Will give you:

{
    "error": {
        "message": "Something wrong happened.",
        "code": 400,
        "internal": "value(None) for key(email) does not fit definition: [<type 'str'>, <type 'list'>]"
    }
}

I'm separating message from internal because message is language dependent, while internal is internal code for that message, or sometimes a very technical error that is already logged elsewhere (this example).

Sometimes internal will contain a very specific keyword, for example auth, which API will return that on bad authentication, and it's a result that we'll have to test for in Java and resolve it internally. I'll explain in detail later.

from flowcrypt-android.

DenBond7 avatar DenBond7 commented on July 24, 2024

"subscription" (<type 'dict'>) # subscription status

Can you provide JSON example? I want to know how I must reproduce this structure in the Java code.
<type 'dict'> - is this Java Map object?

from flowcrypt-android.

DenBond7 avatar DenBond7 commented on July 24, 2024

@tomholub

You will be getting the results in the desired format when you add a header: api-version: 3

I added header: api-version: 3 and all ok. It's my mistake.

from flowcrypt-android.

DenBond7 avatar DenBond7 commented on July 24, 2024

(auth required) what does it mean? What kind of type of auth will be used here?

from flowcrypt-android.

tomholub avatar tomholub commented on July 24, 2024

<type 'dict'> - is this Java Map object?

This just means a json object. It's correct to ask what's inside the object, it's not clear from the docs.

Can you provide JSON example? I want to know how I must reproduce this structure in the Java code. It's something like this for a subscription object:

{
  'level': account['subscription_level'], (string eg "pro" or NULL)
  'expire': account['subscription_expire'], (datetime formatted as a string, eg "2020-20-20 16:50" - expiration of subscription, or NULL)
  'method': account['subscription_method'], (payment method string: "trial" or "stripe", or NULL)
  'expired': false, (true or false - subscription expired, or NULL)
}

from flowcrypt-android.

tomholub avatar tomholub commented on July 24, 2024

Auth - I will have to produce proper spec for this. It will involve /account/login to retrieve login credentials, which are two things: typically email address and uuid.

I will document the whole process shortly.

from flowcrypt-android.

DenBond7 avatar DenBond7 commented on July 24, 2024

I will document the whole process shortly.

Ok. I prepared the general logic for API calls. At the moment I added simple variants, which include primitive types and not required the auth.

Now I will wait while you will document the whole process and then I will resume work on this task.

from flowcrypt-android.

tomholub avatar tomholub commented on July 24, 2024

closing this until needed in the future

from flowcrypt-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.