[英]sendgrid error "403 access forbidden" when trying to create sub user
I get 403 access forbidden error:我收到 403 访问禁止错误:
$apiKey= env('API_KEY_FOR_SENDGRID');
$sg = new \SendGrid($apiKey);
// Create Subuser #
$request_body = json_decode('{
"email": "subuser_email",
"ips": [
"1.1.1.1",
"2.2.2.2" ],
"password": "password",
"username": "subuser_username"
}');
try {
$response = $sg->client->subusers()->post($request_body);
dd($response);
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
I have configured every single permission to 'Full Access' of api key But i got the same error {"errors":[{"field":null,"message":"access forbidden"}]}.我已将每个权限配置为 api 密钥的“完全访问”但我得到了同样的错误{“错误”:[{“字段”:null,“消息”:“禁止访问”}]}。
My question: what i do error is removed and sub user is created?我的问题:我做了什么错误被删除并创建了子用户?
I have experienced exactly the same issue - no resolution at the moment.我遇到了完全相同的问题 - 目前没有解决方案。 New API key does not solve this.
新的 API 密钥无法解决此问题。 No code changes etc., just the "Forbidden" response.
没有代码更改等,只有“禁止”响应。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.