Skip to content
This repository has been archived by the owner on Aug 27, 2021. It is now read-only.

Fix #3751 #3971

Merged
merged 1 commit into from
Oct 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ curl -X "GET" "https://api.sendgrid.com/v3/templates" -H "Authorization: Bearer
On-Behalf of Subuser
{% endanchor %}

The on-behalf-of header allows you to make calls for a particular subuser through the parent account; this can be useful for automating bulk updates or administering a subuser without changing authentication in your code. In the header you are passing, you will simply need to add: `On-Behalf-Of: subuser_username`
The On-Behalf-Of header allows you to make calls for a particular subuser through the parent account; this can be useful for automating bulk updates or administering a subuser without changing authentication in your code. In the header you are passing, you will simply need to add: `On-Behalf-Of: subuser_username`

This will generate the api call as if it was the subuser account itself making the call. Just make sure you are using the correct subuser username.

When authenticating using the on-behalf-of header, you will need to use the API key credentials of the parent account.
When authenticating using the On-Behalf-Of header, you will need to use the API key credentials of the parent account.

{% anchor h3 %}
Using API Key:
Expand All @@ -54,9 +54,9 @@ curl -X GET \

-H 'authorization: Bearer API Key' \

-H 'on-behalf-of: subuser_username' \
-H 'On-Behalf-Of: subuser_username' \
{% endcodeblock %}

{% warning %}
Please note: The on-behalf-of header will not work with the `mail.send` API.
Please note: The On-Behalf-Of header will not work with the `mail.send` API.
{% endwarning %}
2 changes: 1 addition & 1 deletion source/API_Reference/Web_API_v3/Mail/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
{% codeblock %}
Response Code: 202 Accepted
Response Headers:
Access-Control-Allow-Headers →Authorization, Content-Type, On-behalf-of, x-sg-elas-acl
Access-Control-Allow-Headers →Authorization, Content-Type, On-behalf-Of, x-sg-elas-acl
Access-Control-Allow-Methods →POST
Access-Control-Allow-Origin →https://sendgrid.api-docs.io
Access-Control-Max-Age →600
Expand Down