Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Sv translation
languageen

POST /users/{username}/accessToken

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

Note

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. If "Allow login with email" is enabled. User's email can be used.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:

Code Block
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:

Code Block
javascript
javascript
08evn5ieuz84;nd7an9eba41c


...