close
The Wayback Machine - https://web.archive.org/web/20140813141645/https://developer.beatsmusic.com/docs/read/users/Create

Create

Register (create) a new Beats user. This endpoint is only available to partner applications.


Endpoint URL

/api/users


HTTP Method

POST


Authentication

Client ID required. See how to authenticate public resources here.


Parameters

Name Required Description Example
username required User’s username. Limited to alphanumeric and underscore characters. bobbyD
email required User's email bob@example.com
full_name required User's full name Bob Davison
password optional The Beats user's password "mysecretpassword"

Response Elements

ResponseDescription
code

Beats API response code. If successful, code is 'OK'. Otherwise it will be an error code.

type

The entity type of the API object

username

Username

full_name

User's full name

country

The two-letter country code of the location of the client as determined by IP address look-up.


Example Response

{
    "code": "OK",
    "data": {
        "type": "user",
        "id": "5kosWHmB49Q",
        "country": "US",
        "username": "bobbyD",
        "full_name": "Bob Davison"
    }
}

 

Errors

RegionIpMismatch [403]

The user’s IP address does not allow access to this region’s servers.
The user’s IP address does not allow access to this region’s servers.

InvalidCredentials [401]

Facebook: Invalid OAuth access token.
Invalid Facebook access token

FacebookError [409]

Error validating access token: Session has expired at unix time <time>. The current unix time is <time>.
Facebook access token expired

FacebookError [409]

Cannot access application using the specified access_token
Facebook access token is not associated with Beats-API

InvalidCredentials [401]

Invalid Twitter tokens
The Twitter tokens were not validated by Twitter

ResourceAlreadyExists [409]

TwitterUser twitter_uid already taken
Twitter account is already linked to a Beats user.

Docs Navigation