Type to search...

Access token: update


HTTP request

PUT /secure/v1/access-token/<token> HTTP/1.1


PATCH /secure/v1/access-token/<token> HTTP/1.1


Paramete name Value Description
Path parameters
token string Token, ID of access token

Request Body

Property name Value Description
Required properties
type string Type of the access token
expiry integer Expiration time of the access token
limit object Usage limitation of the access token
Optional properties
extra object Additional extras for the access token


If successful, this method returns a access token resource in the response body.

Response HTTP status code

HTTP status code Description
200 Success

For more information about HTTP codes, click here.

Rate limit

Detailed information for access token rate limitation is available on Shardimage developers.


use shardimage\shardimagephp\auth\Client;
use shardimage\shardimagephp\models\accesstoken\UploadAccessToken;
$client = new Client([
    'apiKey' => '<apiKey>',
    'apiSecret' => '<apiSecret>',
    'imageSecret' => '<imageSecret>',
try {
    $token = new UploadAccessToken(['id' => <token>]);
    $token = $client->getAccessTokenService()->view($token);
    $token->limit = 2000;
    $token->extra = null;
    $result = $client->getAccessTokenService()->update($token);
} catch (\Exception $e) {
    // Handling the error
Table of contents