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?










share|improve this question





















  • Envato API has been changed recently, you can visit build.envato.com/api for updated one
    – Tristup
    Nov 12 at 8:44














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?










share|improve this question





















  • Envato API has been changed recently, you can visit build.envato.com/api for updated one
    – Tristup
    Nov 12 at 8:44












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?










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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
















  • 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












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.






share|improve this answer






















  • 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










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
);



);













draft saved

draft discarded


















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.






share|improve this answer






















  • 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














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.






share|improve this answer






















  • 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












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.






share|improve this answer














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.







share|improve this answer














share|improve this answer



share|improve this answer








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
















  • 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

















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Use pre created SQLite database for Android project in kotlin

Darth Vader #20

Ondo