Reset Password
Check your e-mail for further instructions.
Reset
Name
oauth2_token
Auth
no
Description
This method is used when an app is using the code flow. The app calls this method to obtain a bearer token, after the user had authorized the app.
This method expects the app's key and secret.
Also the code received from the redirect from oauth2_token is required.
URL
https://api.pcloud.com/oauth2_token
Required
Parameter | Description |
client_id | string - id of the application |
client_secret | string - secret code for the application |
code | code - code returned to the redirect from authorize page |
Output
After the code is validted, the method returns the object with fields:
Parameter | Description |
access_token | string A token that could be used to call pCloud API methods. |
token_type | string The type of the token (always bearer). |
uid | int The ID of the user, who gave access to the app. |
Example
{ result: 0, access_token: "dghdghdj", token_type: "bearer", uid: 34535 }