GithubHelp home page GithubHelp logo

fxa-keyserver's Introduction

Firefox Accounts Key Server API

Overview

URL Structure

https://<server-url>/v1/<api-endpoint>

Note that:

  • All API access must be over HTTPS
  • The URL embeds a version identifier "v1"; future revisions of this API may introduce new version numbers.
  • The base URL of the server may be configured on a per-client basis

Authorization

Most endpoints that return user data require authorization from the OAuth server. After a bearer token is received for the user, you can pass it to these endpoints as a header:

Authorization: Bearer 558f9980ad5a9c279beb52123653967342f702e84d3ab34c7f80427a6a37e2c0

Some endpoints may require certain scopes as well; these will be listed in each endpoint. The general scope profile automatically has all scopes for this server.

Errors

Invalid requests will return 4XX responses. Internal failures will return 5XX. Both will include JSON responses describing the error.

Example error:

{
  "code": 400, // matches the HTTP status code
  "errno": 101, // stable application-level error number
  "error": "Bad Request", // string description of error type
  "message": "Unknown client"
}

The currently-defined error responses are:

  • status code, errno: description
  • 403, 100: Unauthorized
  • 400, 101: Invalid request parameter
  • 503, 104: OAuth service unavailable
  • 500, 999: internal server error

API Endpoints

GET /v1/search

Search for a user.

Parameters

  • email email to look for.

GET /v1/users/:uid/keys

Lists all keys for an uid - ordered by creation date.

GET /v1/users/:uid/keys/:fingerprint

Retrieves a user's key

GET /v1/users/:uid/keys/:fingerprint

Adds a key

DELETE /v1/users/:uid/keys/:fingerprint

Deletes a user's key

fxa-keyserver's People

Contributors

tarekziade avatar

Watchers

James Cloos avatar  avatar

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.