Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 2.09 KB

File metadata and controls

58 lines (39 loc) · 2.09 KB

Swagger\Client\AuthenticationApi

All URIs are relative to https://apiv2.shiprocket.in

Method HTTP request Description
getToken POST /v1/external/auth/login Access Token

getToken

\Swagger\Client\Model\GetTokenResponse getToken($body)

Access Token

The token is the authorization key that you need to pass before using the ShipRocket API's. Generating the token is an extremely simple process. Simply type in your email id (alternate id for the ShipRocket API) and all your details will be generated. | Steps to Use Token -----| 1. Copy the Token recieved in Response. 2. Click on Authorize Button. 3. Type Bearer <token> in the Value. 4. Click on Authorize and close the pop-up. 5. Now you can use all the api's.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Swagger\Client\Api\AuthenticationApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$body = new \Swagger\Client\Model\GetTokenRequest(); // \Swagger\Client\Model\GetTokenRequest | 

try {
    $result = $apiInstance->getToken($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthenticationApi->getToken: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Swagger\Client\Model\GetTokenRequest

Return type

\Swagger\Client\Model\GetTokenResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]