![](/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.