Envato API send POST request from server
up vote
0
down vote
favorite
They are saying like:
After the user has logged in and given their permission, the Envato
API will redirect them back to your application on the Confirmation
URL provided, with a single-use authentication code provided in the
query string (eg. http://your.app/callback?code=abc123...). You must
use this code to request an access token from the API, by sending the
following POST request from your server (encoded as
application/x-www-form-urlencoded), replacing [CODE] with the code
you've just received, [CLIENT_SECRET] with your secret application
key, and the other fields as necessary:
POST https://api.envato.com/token
grant_type=authorization_code&
code=[CODE]&
client_id=[CLIENT_ID]&
client_secret=[CLIENT_SECRET]
I am able to get the code by $_GET('code'); how make a post request to above url?
php wordpress api http-post
add a comment |
up vote
0
down vote
favorite
They are saying like:
After the user has logged in and given their permission, the Envato
API will redirect them back to your application on the Confirmation
URL provided, with a single-use authentication code provided in the
query string (eg. http://your.app/callback?code=abc123...). You must
use this code to request an access token from the API, by sending the
following POST request from your server (encoded as
application/x-www-form-urlencoded), replacing [CODE] with the code
you've just received, [CLIENT_SECRET] with your secret application
key, and the other fields as necessary:
POST https://api.envato.com/token
grant_type=authorization_code&
code=[CODE]&
client_id=[CLIENT_ID]&
client_secret=[CLIENT_SECRET]
I am able to get the code by $_GET('code'); how make a post request to above url?
php wordpress api http-post
Envato API has been changed recently, you can visit build.envato.com/api for updated one
– Tristup
Nov 12 at 8:44
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
They are saying like:
After the user has logged in and given their permission, the Envato
API will redirect them back to your application on the Confirmation
URL provided, with a single-use authentication code provided in the
query string (eg. http://your.app/callback?code=abc123...). You must
use this code to request an access token from the API, by sending the
following POST request from your server (encoded as
application/x-www-form-urlencoded), replacing [CODE] with the code
you've just received, [CLIENT_SECRET] with your secret application
key, and the other fields as necessary:
POST https://api.envato.com/token
grant_type=authorization_code&
code=[CODE]&
client_id=[CLIENT_ID]&
client_secret=[CLIENT_SECRET]
I am able to get the code by $_GET('code'); how make a post request to above url?
php wordpress api http-post
They are saying like:
After the user has logged in and given their permission, the Envato
API will redirect them back to your application on the Confirmation
URL provided, with a single-use authentication code provided in the
query string (eg. http://your.app/callback?code=abc123...). You must
use this code to request an access token from the API, by sending the
following POST request from your server (encoded as
application/x-www-form-urlencoded), replacing [CODE] with the code
you've just received, [CLIENT_SECRET] with your secret application
key, and the other fields as necessary:
POST https://api.envato.com/token
grant_type=authorization_code&
code=[CODE]&
client_id=[CLIENT_ID]&
client_secret=[CLIENT_SECRET]
I am able to get the code by $_GET('code'); how make a post request to above url?
php wordpress api http-post
php wordpress api http-post
asked Nov 10 at 19:48
Latheesh V M Villa
14419
14419
Envato API has been changed recently, you can visit build.envato.com/api for updated one
– Tristup
Nov 12 at 8:44
add a comment |
Envato API has been changed recently, you can visit build.envato.com/api for updated one
– Tristup
Nov 12 at 8:44
Envato API has been changed recently, you can visit build.envato.com/api for updated one
– Tristup
Nov 12 at 8:44
Envato API has been changed recently, you can visit build.envato.com/api for updated one
– Tristup
Nov 12 at 8:44
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
You'd probably want to use curl or a similar library. Here's a quick tutorial about curl that includes a post: http://codular.com/curl-with-php. It even mentions oauth, which sounds like what you're doing.
Hello thanks, will it be possible to provide a code for it..i have not used the curl before and confused with the case above pls
– Latheesh V M Villa
Nov 10 at 20:18
Actually I'll edit my answer. A much better example can be found here: codular.com/curl-with-php
– Snake14
Nov 10 at 20:27
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53242789%2fenvato-api-send-post-request-from-server%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
You'd probably want to use curl or a similar library. Here's a quick tutorial about curl that includes a post: http://codular.com/curl-with-php. It even mentions oauth, which sounds like what you're doing.
Hello thanks, will it be possible to provide a code for it..i have not used the curl before and confused with the case above pls
– Latheesh V M Villa
Nov 10 at 20:18
Actually I'll edit my answer. A much better example can be found here: codular.com/curl-with-php
– Snake14
Nov 10 at 20:27
add a comment |
up vote
2
down vote
accepted
You'd probably want to use curl or a similar library. Here's a quick tutorial about curl that includes a post: http://codular.com/curl-with-php. It even mentions oauth, which sounds like what you're doing.
Hello thanks, will it be possible to provide a code for it..i have not used the curl before and confused with the case above pls
– Latheesh V M Villa
Nov 10 at 20:18
Actually I'll edit my answer. A much better example can be found here: codular.com/curl-with-php
– Snake14
Nov 10 at 20:27
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
You'd probably want to use curl or a similar library. Here's a quick tutorial about curl that includes a post: http://codular.com/curl-with-php. It even mentions oauth, which sounds like what you're doing.
You'd probably want to use curl or a similar library. Here's a quick tutorial about curl that includes a post: http://codular.com/curl-with-php. It even mentions oauth, which sounds like what you're doing.
edited Nov 10 at 20:28
answered Nov 10 at 20:05
Snake14
28917
28917
Hello thanks, will it be possible to provide a code for it..i have not used the curl before and confused with the case above pls
– Latheesh V M Villa
Nov 10 at 20:18
Actually I'll edit my answer. A much better example can be found here: codular.com/curl-with-php
– Snake14
Nov 10 at 20:27
add a comment |
Hello thanks, will it be possible to provide a code for it..i have not used the curl before and confused with the case above pls
– Latheesh V M Villa
Nov 10 at 20:18
Actually I'll edit my answer. A much better example can be found here: codular.com/curl-with-php
– Snake14
Nov 10 at 20:27
Hello thanks, will it be possible to provide a code for it..i have not used the curl before and confused with the case above pls
– Latheesh V M Villa
Nov 10 at 20:18
Hello thanks, will it be possible to provide a code for it..i have not used the curl before and confused with the case above pls
– Latheesh V M Villa
Nov 10 at 20:18
Actually I'll edit my answer. A much better example can be found here: codular.com/curl-with-php
– Snake14
Nov 10 at 20:27
Actually I'll edit my answer. A much better example can be found here: codular.com/curl-with-php
– Snake14
Nov 10 at 20:27
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53242789%2fenvato-api-send-post-request-from-server%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Envato API has been changed recently, you can visit build.envato.com/api for updated one
– Tristup
Nov 12 at 8:44