POST /users/{username}/accessToken

Creates an access token (oauth_token and oauth_token_secret) for user specified by username.

This resource is available only for Global admin or Domain admin.

Resource Information

Request Parameters

Parameters

Detail

Example

username
(path parameter)

Username of the user the access token is created for.myUsername

validity
(form parameter)

If set, specifies the validity (in seconds) of issued token.

30

domain_id
(form parameter)

Specifies the domain for which the access should be granted. This parameter is applicable for multi-domain deployments only.

123

Sample Request / Response

Using curl:

curl -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\"" -d "validity=30" -d "domain_id=123" https://service.belladati.com/api/users/myUsername/accessToken

Response in format oauth_token;oauth_token_secret:

08evn5ieuz84;nd7an9eba41c
  • No labels