Working with Users
The OAuth API makes it easy to make authenticated API calls to providers that require OAuth. It does this by offering the developer a simple token called a SmartKey for every user, and associates that SmartKey with the tokens granted by each service the user authorize with the app (such as Twitter, Salesforce, or Salesforce Chatter).
List all users
GET https://{appname}-api.apigee.com/v1/users.json
Note: requires basic authentication, available only to the developer/admin
Parameters
Template Parameters
- appname, required - the name of the application that prefixes the app endpoint
See an example in the API Console:
GET https://{appname}-api.apigee.com/v1/users.json
Create a user
POST https://{appname}-api.apigee.com/v1/users.json
Note: this is a public resource, requiring no authentication
Parameters
Template Parameters
- appname, required - the name of the application that prefixes the app endpoint
Form Encoded Parameters
- userName, required - the desired name or identifier for a user of the app (an email is recommended). If the username is not available, a 500 error will be returned.
- password, required - the secret that will accompany the username when accessing resources over basic authentication, such as retrieving a SmartKey.
- fullName, optional - a more descriptive field that can be used for more human-friendly display names
See an example in the API Console:
POST https://{appname}-api.apigee.com/v1/users.json
Get user info
GET https://{appname}-api.apigee.com/v1/users/{username}.json
Note: requires basic authentication. Authenticating as a user gives access only to that user's information. The developer/admin has access to all records.
Parameters
Template Parameters
- appname, required - the name of the application that prefixes the app endpoint
See an example in the API Console:
GET https://{appname}-api.apigee.com/v1/users/{username}.json
Update a user
PUT https://{appname}-api.apigee.com/v1/users.json
Note: requires basic authentication
Parameters
Template Parameters
- appname, required - the name of the application that prefixes the app endpoint
Form Encoded Parameters
- userName, optional - the desired name or identifier for a user of the app (an email is recommended). If the username is not available, a 500 error will be returned.
- password, optional - the secret that will accompany the username when accessing resources over basic authentication, such as retrieving a SmartKey.
- fullName, optional - a more descriptive field that can be used for more human-friendly display names
See an example in the API Console:
https://{appname}-api.apigee.com/v1/users/{username}.json
Delete user
DELETE https://{appname}-api.apigee.com/v1/users/{username}.json
Note: requires basic authentication. Authenticating as a user gives access only to that user's information. The developer/admin has access to all records.
Parameters
Template Parameters
- appname, required - the name of the application that prefixes the app endpoint
See an example in the API Console:
DELETE https://{appname}-api.apigee.com/v1/users/{username}.json