<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CR highlight Archives - ServerStadium</title>
	<atom:link href="https://serverstadium.com/knowledge-base/tag/cr-highlight/feed/" rel="self" type="application/rss+xml" />
	<link>https://serverstadium.com/knowledge-base/tag/cr-highlight/</link>
	<description>Public Cloud Solution by ServerStadium</description>
	<lastBuildDate>Fri, 14 Apr 2023 07:04:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>

<image>
	<url>https://serverstadium.com/wp-content/uploads/2023/04/cropped-favicon-1-32x32.png</url>
	<title>CR highlight Archives - ServerStadium</title>
	<link>https://serverstadium.com/knowledge-base/tag/cr-highlight/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Generating an API Token</title>
		<link>https://serverstadium.com/knowledge-base/generate-an-api-token/</link>
		
		<dc:creator><![CDATA[Brian K]]></dc:creator>
		<pubDate>Tue, 25 Aug 2020 13:48:47 +0000</pubDate>
				<guid isPermaLink="false">https://cloudraya.com/knowledge-base/?p=153</guid>

					<description><![CDATA[<p>API token is useful to enable access to ServerStadium API located in the API documentation. You can generate such token once you have generated an API key via this guidelines Generate API Key. Please follow the steps below. In our API Documentation, you need to send an authentication to the API gateway. This is to&#8230;</p>
<p>The post <a href="https://serverstadium.com/knowledge-base/generate-an-api-token/">Generating an API Token</a> appeared first on <a href="https://serverstadium.com">ServerStadium</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">API token is useful to enable access to ServerStadium API located in the API documentation. You can generate such token once you have generated an API key via this guidelines <a href="https://serverstadium.com/knowledge-base/generating-api-key/" target="_blank" rel="noreferrer noopener">Generate API Key</a>.</p>



<p class="wp-block-paragraph">Please follow the steps below.</p>



<figure class="wp-block-image"><img decoding="async" src="https://serverstadium.com/wp-content/uploads/2020/09/serverstadium-api-token-generate.png" alt="" class="wp-image-367"/></figure>



<p class="wp-block-paragraph">In our <a href="https://cp.serverstadium.com/apidoc" target="_blank" rel="noreferrer noopener">API Documentation</a>, you need to send an authentication to the API gateway. This is to get your API token, in this case a &#8220;Bearer&#8221; Token.</p>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading"><strong>Step 1</strong>: <strong>Sending a http post</strong></h2>



<p class="wp-block-paragraph">Send a http POST to the URL<code><span class="has-inline-color has-vivid-cyan-blue-color"> https://api.serverstadium.com/v1/api/gateway/user/auth</span></code>  with a raw JSON Body that contains the <span class="has-inline-color has-vivid-cyan-blue-color">app_key</span> and <span class="has-inline-color has-vivid-cyan-blue-color">secret_key</span> found in API Gateway Management Page in the ServerStadium Control Panel. The example raw JSON body is as follow.</p>



<pre class="wp-block-code"><code>{
    "app_key": "9a0bb2f3-4e2e-4e57-b340-ee36f3076515",
    "secret_key": "QLap0OqzMpRccfeDzAnSD8wqj4FPMlda"
}</code></pre>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading"><strong>Step 2</strong>: <strong>Obtaining a bearer token</strong></h2>



<p class="wp-block-paragraph">The API Gateway will return a &#8220;<span class="has-inline-color has-vivid-cyan-blue-color">bearer_token</span>&#8221; that you can use to communicate with the API gateway. The figure below illustrates the response that you will get regarding the bearer token.</p>



<pre class="wp-block-code"><code>{
    "code": 200,
    "data": {
        "bearer_token": "eyJpdiI6IkhldHRZY0FoZjVaSXdYTEdp.....",
        "username": "the_username",
        "expired_at": "2020-08-20 14:43:27",
        "timezone": "UTC",
        "refresh_token": "eyJpdiI6InhFVVY4QmR2YlFF......."
    },
    "message": "success"
}</code></pre>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading"><strong>Step 3</strong>: <strong>Using the bearer token</strong></h2>



<p class="wp-block-paragraph">You may use the &#8220;<span class="has-inline-color has-vivid-cyan-blue-color">bearer_token</span>&#8221; in your header as an &#8220;<span class="has-inline-color has-vivid-cyan-blue-color">Authorization</span>&#8221; with value &#8220;<span class="has-inline-color has-vivid-cyan-blue-color">Bearer &lt;token&gt;</span>&#8221; without the &#8220;&lt;&#8221; or &#8220;&gt;&#8221;</p>



<p class="wp-block-paragraph"><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-luminous-vivid-orange-color">Remember</mark>, the token can expire. However, you can use the refresh token to get a new token. That way, you do not need to send another authentication to obtain a new token.</p>
<p>The post <a href="https://serverstadium.com/knowledge-base/generate-an-api-token/">Generating an API Token</a> appeared first on <a href="https://serverstadium.com">ServerStadium</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
