{"_id":"56b65931c4bc261700d946a4","parentDoc":null,"category":{"_id":"56b657e11bc6970d009feee7","project":"56acd71213ac890d001c3c7a","__v":2,"pages":["56b65931c4bc261700d946a4","56b65af6e8b41d17005fc332"],"version":"56acd71213ac890d001c3c7d","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-06T20:30:25.089Z","from_sync":false,"order":3,"slug":"oauth-resource","title":"OAuth Resource"},"project":"56acd71213ac890d001c3c7a","__v":0,"githubsync":"","user":"56acd6caa040860d00ac94a2","version":{"_id":"56acd71213ac890d001c3c7d","project":"56acd71213ac890d001c3c7a","__v":15,"createdAt":"2016-01-30T15:30:26.928Z","releaseDate":"2016-01-30T15:30:26.928Z","categories":["56acd71313ac890d001c3c7e","56acd8f113ac890d001c3c81","56acd8f95ac4060d0027865e","56acd93a13ac890d001c3c82","56ad20660ab3c00d00ce3347","56ad356a2a7860170013f714","56ad47eb0ab3c00d00ce334f","56afd523bc304a0d00ace1df","56b29a019621f20d00efb37e","56b657e11bc6970d009feee7","5845cc3c39950c1b002afe77","5845cde163c11b250037967e","5846efd45d064323007b17b4","588604da4674e32300efd160","588627882393d50f00f1322c"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"editedParams":true,"editedParams2":true,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-06T20:36:01.884Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"//The following example uses NodeJS with Express and the simple-oauth2 packages.\n\nvar app = require('express')();\n\nvar oAuthInfo = {\n  site: 'https://api.gamewisp.com',\n  clientID: 'your client ID',\n  clientSecret: 'your client secret',\n  tokenPath: '/pub/v1/oauth/token',\n  authorizationPath: '/pub/v1/oauth/authorize',\n};  \n\nvar oauth2 = require('simple-oauth2')(oAuthInfo);\n\n// Authorization uri definition \nvar authorization_uri = oauth2.authCode.authorizeURL({\n  redirect_uri: 'your-redirect-uri',\n  scope: 'read_only,subscriber_read_limited',\n  state: 'base64 encoded state data, passed back to you'\n});\n\n//redirects to the gamewisp authorize page.\napp.get('/auth', function(req, res){\n  res.redirect(authorization_uri);\n});","language":"javascript"},{"code":"<?php\n\n$query = http_build_query([\n  'response_type' => 'code',\n  'client_id' => 'YOUR_CLIENT_ID',\n  'redirect_uri' => 'YOUR_CLIENT_REDIRECT_URI',\n  'scope' => 'read_only,subscriber_read_limited',\n  'state' => 'optional base64 encoded state string'\n]);\n\nheader(\"Location: https://api.gamewisp.com/pub/v1/oauth/authorize?$query\");\nexit;","language":"php"},{"code":"https://api.gamewisp.com/pub/v1/oauth/authorize?client_id=CLIENT_ID_HERE&redirect_uri=REDIRECT_URI_HERE&response_type=code&scope=read_only,subscriber_read_limited&state=ASKDLFJsisisks23k","language":"text","name":"Sample URL"}]},"method":"get","results":{"codes":[{"name":"","code":"","language":"json","status":200}]},"settings":"","auth":"required","params":[{"_id":"56b65931c4bc261700d946a9","ref":"","in":"query","required":true,"desc":"Response type requested from the endpoint. For web applications, a value of code should be used","default":"","type":"string","name":"response_type"},{"_id":"56b65931c4bc261700d946a8","ref":"","in":"query","required":true,"desc":"Your application's client_id","default":"","type":"string","name":"client_id"},{"_id":"56b65931c4bc261700d946a7","ref":"","in":"query","required":true,"desc":"Your applications redirect_uri","default":"","type":"string","name":"redirect_uri"},{"_id":"56b65931c4bc261700d946a6","ref":"","in":"query","required":true,"desc":"Your requested scopes","default":"","type":"string","name":"scope"},{"_id":"56b65931c4bc261700d946a5","ref":"","in":"query","required":true,"desc":"An optional base64 encoded state string that is passed back to your redirect_uri. If you don't require state, just pass an empty string.","default":"","type":"string","name":"state"}],"url":"/oauth/authorize"},"isReference":false,"order":0,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Need more Help?\",\n  \"body\": \"This endpoint is discussed further in [Connecting to a GameWisp Channel](https://gamewisp.readme.io/docs/connecting-to-a-gamewisp-channel).\"\n}\n[/block]","excerpt":"The endpoint used by clients to authorize access to GameWisp users and channels","slug":"oauthauthorize","type":"endpoint","title":"/oauth/authorize"}

get/oauth/authorize

The endpoint used by clients to authorize access to GameWisp users and channels

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

response_type:
required
string
Response type requested from the endpoint. For web applications, a value of code should be used
client_id:
required
string
Your application's client_id
redirect_uri:
required
string
Your applications redirect_uri
scope:
required
string
Your requested scopes
state:
required
string
An optional base64 encoded state string that is passed back to your redirect_uri. If you don't require state, just pass an empty string.

Examples


Documentation

[block:callout] { "type": "info", "title": "Need more Help?", "body": "This endpoint is discussed further in [Connecting to a GameWisp Channel](https://gamewisp.readme.io/docs/connecting-to-a-gamewisp-channel)." } [/block]