承接 creatissimo/dhl-oauth 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

creatissimo/dhl-oauth

Composer 安装命令:

composer require creatissimo/dhl-oauth

包简介

This API describes how API client can obtain a token which is used to access various Parcel Germany APIs. Using this API is often the first step in making your API call. <p><h3>Preconditions</h3> You will need: * client ID (aka "API Key", obtained when you create an app in developer.dhl.com) * clie

README 文档

README

This API describes how API client can obtain a token which is used to access various Parcel Germany APIs. Using this API is often the first step in making your API call.

Preconditions

You will need:
  • client ID (aka "API Key", obtained when you create an app in developer.dhl.com)
  • client secret (aka "API Secret", obtained when you create an app in developer.dhl.com)
  • GKP user name (obtained when setting up your business account with Parcel Germany)
  • GKP password (obtained when setting up your business account with Parcel Germany)

Technical Information

This uses an implementation of OAuth2 Password Grant (RFC 6749). After successfull usage you will: * have an opaque access token to be used for API calls afterwards * this token will have an expiration time

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

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




$apiInstance = new DHLOauth\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()
);
$grant_type = 'grant_type_example'; // string
$username = 'username_example'; // string | GKP user name. Required for grant_type=password.
$password = 'password_example'; // string | GKP password. Required for grant_type=password.
$client_id = 'client_id_example'; // string
$client_secret = 'client_secret_example'; // string

try {
    $result = $apiInstance->dispenseToken($grant_type, $username, $password, $client_id, $client_secret);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthenticationApi->dispenseToken: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api-sandbox.dhl.com/parcel/de/account/auth/ropc/v1

Class Method HTTP request Description
AuthenticationApi dispenseToken POST /token Obtains an access token based on the credentials submitted or based on the refresh token.
BusinessOperationsApi hello GET /hello This allows testing of the token and also alternative authentication methods.
GeneralApi getSemanticVersion GET / Return API version

Models

Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (Apigee)

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 2.0.5
    • Generator version: 7.22.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

统计信息

  • 总下载量: 21
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: unlicense
  • 更新时间: 2026-06-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固