![](/img/trans.png)
[英]How to call AWS S3 image URL from android(Client) when the authentication with S3 is from server-side(php+ aws sdk php v3)
[英]How to call ResolveCustomer and GetEntitlements from aws-marketplace in PHP?
我正在使用 PHP Laravel,我可以找到 PHP SDK,但是我找不到任何示例。
我需要調用 ResolveCustomer(為產品和用戶生成令牌)和 GetEntitlements(給出產品和用戶的權限列表)。
有人用過這個服務嗎?
我寫的這段代碼有效。
<?php
require 'aws/aws-autoloader.php';
use Aws\AwsClient;
use Aws\Credentials\Credentials;
use Aws\MarketplaceMetering;
$config = [
'credentials' => new Credentials('key', 'secret'),
'region' => 'us-east-1',
'version' => 'latest'
];
$client = new MarketplaceMetering\MarketplaceMeteringClient($config);
$x_amzn_marketplace_token = 'token';
$result = $client->resolveCustomer(['RegistrationToken' => $x_amzn_marketplace_token]);
echo "<pre>";
print_r($result);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.